b=777946 use SetScaleToSize image layers even for non-XP_WIN plugins r=BenWa

--HG--
extra : transplant_source : %A8%2C%E3%0C%0A%DC%E7%3C%7E%94%D4%9A%7C%84m%1E%D1%AE%1Df
This commit is contained in:
Karl Tomlinson 2012-09-17 17:20:10 +12:00
parent c8293dcec2
commit 3850ee1485

View File

@ -1630,16 +1630,7 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
return nullptr;
}
gfxIntSize size;
#ifdef XP_MACOSX
if (mInstanceOwner->GetDrawingModel() == NPDrawingModelCoreAnimation) {
size = container->GetCurrentSize();
} else
#endif
{
size = gfxIntSize(window->width, window->height);
}
gfxIntSize size(window->width, window->height);
nsRect area = GetContentRectRelativeToSelf() + aItem->ToReferenceFrame();
gfxRect r = nsLayoutUtils::RectToGfxRect(area, PresContext()->AppUnitsPerDevPixel());
@ -1662,9 +1653,7 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
ImageLayer* imglayer = static_cast<ImageLayer*>(layer.get());
UpdateImageLayer(r);
#ifdef XP_WIN
imglayer->SetScaleToSize(size, ImageLayer::SCALE_STRETCH);
#endif
imglayer->SetContainer(container);
gfxPattern::GraphicsFilter filter =
nsLayoutUtils::GetGraphicsFilterForFrame(this);