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
parent 29098f3294
commit 5de3ba7f50

View File

@ -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();