Bug 801784 - Only add invalidate children state flags up to the nearest display root. r=roc
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 17 Oct 2012 21:00:00 +1300
changeset 110648 6e111238c65eff495e008096c77c295641662eb7
parent 110647 c1846c1b5c9947cf8da1363c620490bd9985d516
child 110649 4a69dfa3ed05bd73d7a9c261eec2b981a92b210e
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersroc
bugs801784
milestone19.0a1
Bug 801784 - Only add invalidate children state flags up to the nearest display root. r=roc
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4788,23 +4788,25 @@ static void InvalidateFrameInternal(nsIF
   }
   nsSVGEffects::InvalidateDirectRenderingObservers(aFrame);
   nsIFrame *parent = nsLayoutUtils::GetCrossDocParentFrame(aFrame);
   bool needsSchedulePaint = false;
   while (parent && !parent->HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT)) {
     if (aHasDisplayItem) {
       parent->AddStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT);
     }
+    nsSVGEffects::InvalidateDirectRenderingObservers(parent);
+
     // If we're inside a popup, then we need to make sure that we
     // call schedule paint so that the NS_FRAME_UPDATE_LAYER_TREE
     // flag gets added to the popup display root frame.
     if (nsLayoutUtils::IsPopup(parent)) {
       needsSchedulePaint = true;
-    }
-    nsSVGEffects::InvalidateDirectRenderingObservers(parent);
+      break;
+    }
     parent = nsLayoutUtils::GetCrossDocParentFrame(parent);
   }
   if (!aHasDisplayItem) {
     return;
   }
   if (!parent || needsSchedulePaint) {
     aFrame->SchedulePaint();
   }