Bug 1005405 - OverflowChangedTracker::Flush() no longer downgrades parent frames from CHILDREN_AND_PARENT_CHANGED to CHILDREN_CHANGED. r=dbaron, a=sledru
authorKearwood (Kip) Gilbert <kgilbert@mozilla.com>
Tue, 06 May 2014 11:23:00 +0200
changeset 199111 54f1c073c4b54db77182de9a30428162e225742f
parent 199110 71190db0a57fc7915afb5aaba336f6056e580cfb
child 199112 dceb849a2d71f639e37bd7a97ad999ce80c346e8
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron, sledru
bugs1005405
milestone31.0a2
Bug 1005405 - OverflowChangedTracker::Flush() no longer downgrades parent frames from CHILDREN_AND_PARENT_CHANGED to CHILDREN_CHANGED. r=dbaron, a=sledru - When OverflowChangedTracker::Flush() coalesces multiple changes simultaneously, it was possible to downgrade parent frames from CHILDREN_AND_PARENT_CHANGED to CHILDREN_CHANGED, resulting in an incomplete update. - This patch ensures that the strongest ChangeKind is retained when cascading up to parent frames.
layout/base/RestyleTracker.h
--- a/layout/base/RestyleTracker.h
+++ b/layout/base/RestyleTracker.h
@@ -161,17 +161,17 @@ public:
       // If the frame style changed (e.g. positioning offsets)
       // then we need to update the parent with the overflow areas of its
       // children.
       if (overflowChanged) {
         nsIFrame *parent = frame->GetParent();
         if (parent && parent != mSubtreeRoot) {
           Entry* parentEntry = mEntryList.find(Entry(parent, entry->mDepth - 1));
           if (parentEntry) {
-            parentEntry->mChangeKind = CHILDREN_CHANGED;
+            parentEntry->mChangeKind = std::max(parentEntry->mChangeKind, CHILDREN_CHANGED);
           } else {
             mEntryList.insert(new Entry(parent, entry->mDepth - 1, CHILDREN_CHANGED));
           }
         }
       }
       delete entry;
     }
   }