Bug 900592 - Correctly size plugins on Android according to resolution r=kats

--HG--
extra : rebase_source : e25d84fa64b29cb325a7a50a72e410cb14c7e083
This commit is contained in:
James Willcox 2014-01-15 09:16:41 -06:00
Родитель 7d097f42c5
Коммит 046eecc111
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -173,9 +173,8 @@ nsPluginInstanceOwner::GetImageContainer()
// NotifySize() causes Flash to do a bunch of stuff like ask for surfaces to render
// into, set y-flip flags, etc, so we do this at the beginning.
float xResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetXResolution();
float yResolution = mObjectFrame->PresContext()->GetRootPresContext()->PresShell()->GetYResolution();
ScreenSize screenSize = (r * LayoutDeviceToScreenScale(xResolution, yResolution)).Size();
gfxSize resolution = mObjectFrame->PresContext()->PresShell()->GetCumulativeResolution();
ScreenSize screenSize = (r * LayoutDeviceToScreenScale(resolution.width, resolution.height)).Size();
mInstance->NotifySize(nsIntSize(screenSize.width, screenSize.height));
container = LayerManager::CreateImageContainer();