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

--HG--
extra : transplant_source : %92%E0%C3d%25BA%BC%EC%22%B5%B2%83%FFW%11%DC%03V%2C
This commit is contained in:
Karl Tomlinson 2012-09-18 15:16:33 +12:00
Родитель 360aa86a2a
Коммит baea98c529
1 изменённых файлов: 1 добавлений и 11 удалений

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

@ -650,7 +650,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
@ -668,16 +667,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;