b=777946 remove no-op code remaining from size change invalidation r=roc

--HG--
extra : transplant_source : %DF%8D8%3AuG%80%2B%A8%DFFm%C8%28%1F%C7A%DB.J
This commit is contained in:
Karl Tomlinson 2012-09-17 18:50:25 +12:00
parent 3850ee1485
commit a7700efae5

View File

@ -646,7 +646,6 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(NPRect *invalidRect)
// date and update our ImageContainer with the new surface.
nsRefPtr<ImageContainer> container;
mInstance->GetImageContainer(getter_AddRefs(container));
gfxIntSize oldSize(0, 0);
#ifndef XP_MACOSX
// Windowed plugins should not be calling NPN_InvalidateRect, but
@ -664,16 +663,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(NPRect *invalidRect)
presContext->DevPixelsToAppUnits(invalidRect->top),
presContext->DevPixelsToAppUnits(invalidRect->right - invalidRect->left),
presContext->DevPixelsToAppUnits(invalidRect->bottom - invalidRect->top));
if (container) {
gfxIntSize newSize = container->GetCurrentSize();
if (newSize != oldSize) {
// The image size has changed - invalidate the old area too, bug 635405.
nsRect oldRect = nsRect(0, 0,
presContext->DevPixelsToAppUnits(oldSize.width),
presContext->DevPixelsToAppUnits(oldSize.height));
rect.UnionRect(rect, oldRect);
}
}
rect.MoveBy(mObjectFrame->GetContentRectRelativeToSelf().TopLeft());
mObjectFrame->InvalidateLayer(rect, nsDisplayItem::TYPE_PLUGIN);
return NS_OK;