зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
44ef8ba9c0
Коммит
13a2eac501
|
@ -646,7 +646,6 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(NPRect *invalidRect)
|
||||||
// date and update our ImageContainer with the new surface.
|
// date and update our ImageContainer with the new surface.
|
||||||
nsRefPtr<ImageContainer> container;
|
nsRefPtr<ImageContainer> container;
|
||||||
mInstance->GetImageContainer(getter_AddRefs(container));
|
mInstance->GetImageContainer(getter_AddRefs(container));
|
||||||
gfxIntSize oldSize(0, 0);
|
|
||||||
|
|
||||||
#ifndef XP_MACOSX
|
#ifndef XP_MACOSX
|
||||||
// Windowed plugins should not be calling NPN_InvalidateRect, but
|
// 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->top),
|
||||||
presContext->DevPixelsToAppUnits(invalidRect->right - invalidRect->left),
|
presContext->DevPixelsToAppUnits(invalidRect->right - invalidRect->left),
|
||||||
presContext->DevPixelsToAppUnits(invalidRect->bottom - invalidRect->top));
|
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());
|
rect.MoveBy(mObjectFrame->GetContentRectRelativeToSelf().TopLeft());
|
||||||
mObjectFrame->InvalidateLayer(rect, nsDisplayItem::TYPE_PLUGIN);
|
mObjectFrame->InvalidateLayer(rect, nsDisplayItem::TYPE_PLUGIN);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче