Bug 841192. Part 7: Move child->MarkAbsoluteFramesForDisplayList call down. r=mattwoodrow
authorRobert O'Callahan <robert@ocallahan.org>
Mon, 04 Mar 2013 22:56:01 +1300
changeset 127802 a9214f38c73e930990123678bf1f4bfc26ac7cf5
parent 127801 dc2f8190c7dd7959ff52db79666634f3da8f5753
child 127803 b16876942c8df78107b10f0288f88f27198cbdc8
push id24512
push userryanvm@gmail.com
push dateFri, 05 Apr 2013 20:13:49 +0000
treeherdermozilla-central@139b6ba547fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs841192
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 841192. Part 7: Move child->MarkAbsoluteFramesForDisplayList call down. r=mattwoodrow
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2133,20 +2133,19 @@ nsIFrame::BuildDisplayListForChild(nsDis
       (child->Properties().Get(nsDisplayListBuilder::Preserve3DDirtyRectProperty()));
     if (savedDirty) {
       dirty = *savedDirty;
     } else {
       dirty.SetEmpty();
     }
   }
 
-  child->MarkAbsoluteFramesForDisplayList(aBuilder, dirty);
-
-  if (childType != nsGkAtoms::placeholderFrame &&
-      aBuilder->GetSelectedFramesOnly() &&
+  NS_ASSERTION(childType != nsGkAtoms::placeholderFrame,
+               "Should have dealt with placeholders already");
+  if (aBuilder->GetSelectedFramesOnly() &&
       child->IsLeaf() &&
       !aChild->IsSelected()) {
     return;
   }
 
   if (aBuilder->GetIncludeAllOutOfFlows() &&
       (child->GetStateBits() & NS_FRAME_OUT_OF_FLOW)) {
     dirty = child->GetVisualOverflowRect();
@@ -2218,16 +2217,18 @@ nsIFrame::BuildDisplayListForChild(nsDis
   }
   // Don't use overflowClip to restrict the dirty rect, since some of the
   // descendants may not be clipped by it. Even if we end up with unnecessary
   // display items, they'll be pruned during ComputeVisibility. Note that
   // this overflow-clipping here only applies to overflow:-moz-hidden-unscrollable;
   // overflow:hidden etc creates an nsHTML/XULScrollFrame which does its own
   // clipping.
 
+  child->MarkAbsoluteFramesForDisplayList(aBuilder, dirty);
+
   if (!pseudoStackingContext) {
     // THIS IS THE COMMON CASE.
     // Not a pseudo or real stacking context. Do the simple thing and
     // return early.
     if (applyOverflowClip) {
       BuildDisplayListWithOverflowClip(aBuilder, child, dirty, aLists,
                                        overflowClip, overflowClipRadii);
     } else {