Bug 620512. Part 1: Only fire MozPaintWait and change window visibility in BuildDisplayList if we're painting. r=bsmedberg, a=b:b9

This commit is contained in:
Robert O'Callahan 2010-12-21 12:12:00 -08:00
Родитель 1ffcece80a
Коммит 9614e69f94
2 изменённых файлов: 6 добавлений и 2 удалений

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

@ -151,10 +151,14 @@ public:
*/ */
PRBool IsForEventDelivery() { return mMode == EVENT_DELIVERY; } PRBool IsForEventDelivery() { return mMode == EVENT_DELIVERY; }
/** /**
* @return PR_TRUE if the display list is being build to compute geometry * @return PR_TRUE if the display list is being built to compute geometry
* for plugins. * for plugins.
*/ */
PRBool IsForPluginGeometry() { return mMode == PLUGIN_GEOMETRY; } PRBool IsForPluginGeometry() { return mMode == PLUGIN_GEOMETRY; }
/**
* @return PR_TRUE if the display list is being built for painting.
*/
PRBool IsForPainting() { return mMode == PAINTING; }
/** /**
* @return PR_TRUE if "painting is suppressed" during page load and we * @return PR_TRUE if "painting is suppressed" during page load and we
* should paint only the background of the document. * should paint only the background of the document.

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

@ -1469,7 +1469,7 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsDisplayList replacedContent; nsDisplayList replacedContent;
if (mInstanceOwner && mInstanceOwner->UseLayers()) { if (aBuilder->IsForPainting() && mInstanceOwner && mInstanceOwner->UseLayers()) {
NPWindow* window = nsnull; NPWindow* window = nsnull;
mInstanceOwner->GetWindow(window); mInstanceOwner->GetWindow(window);
PRBool isVisible = window && window->width > 0 && window->height > 0; PRBool isVisible = window && window->width > 0 && window->height > 0;