Bug 617152. Part 9: Use desired bounds in nsDisplayList::GetBounds, not actual bounds, when computing plugin geometry. r=tnikkel

This commit is contained in:
Robert O'Callahan 2010-12-20 14:37:43 +13:00
Родитель 5d9528d55a
Коммит 72497251bc
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -1251,6 +1251,12 @@ nsDisplayPlugin::GetBounds(nsDisplayListBuilder* aBuilder)
{ {
nsRect r = mFrame->GetContentRect() - mFrame->GetPosition() + nsRect r = mFrame->GetContentRect() - mFrame->GetPosition() +
ToReferenceFrame(); ToReferenceFrame();
if (aBuilder->IsForPluginGeometry()) {
// Return the geometry we want, not the geometry we have (which is based
// on the surface the plugin last gave us)
return r;
}
nsObjectFrame* f = static_cast<nsObjectFrame*>(mFrame); nsObjectFrame* f = static_cast<nsObjectFrame*>(mFrame);
if (mozilla::LAYER_ACTIVE == f->GetLayerState(aBuilder, nsnull)) { if (mozilla::LAYER_ACTIVE == f->GetLayerState(aBuilder, nsnull)) {
ImageContainer* c = f->GetImageContainer(); ImageContainer* c = f->GetImageContainer();