Bug 1285411 - Mark preserve 3d children as "force descend into" before we mark absolute frames so that we can save the proper clip for more out of flow frames. r=mattwoodrow, a=gchang
authorTimothy Nikkel <tnikkel@gmail.com>
Sat, 09 Jul 2016 18:41:02 -0500
changeset 341958 6c4ced3ac243a3e36549904fbe5f889a7a7deaab
parent 341957 87f0c9babed36b1384431e1a8c4cdca749e4b536
child 341959 e98dd5b41a6972b87b8d958a42da03ae1ce24f98
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow, gchang
bugs1285411
milestone49.0a2
Bug 1285411 - Mark preserve 3d children as "force descend into" before we mark absolute frames so that we can save the proper clip for more out of flow frames. r=mattwoodrow, a=gchang
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2291,24 +2291,26 @@ nsIFrame::BuildDisplayListForStackingCon
     CheckForApzAwareEventHandlers(aBuilder, this);
 
     nsRect clipPropClip;
     if (ApplyClipPropClipping(aBuilder, this, disp, effects, &clipPropClip,
                               nestedClipState)) {
       dirtyRect.IntersectRect(dirtyRect, clipPropClip);
     }
 
-    MarkAbsoluteFramesForDisplayList(aBuilder, dirtyRect);
-
     // Extend3DContext() also guarantees that applyAbsPosClipping and usingSVGEffects are false
     // We only modify the preserve-3d rect if we are the top of a preserve-3d heirarchy
     if (Extend3DContext()) {
+      // Mark these first so MarkAbsoluteFramesForDisplayList knows if we are
+      // going to be forced to descend into frames.
       aBuilder->MarkPreserve3DFramesForDisplayList(this);
     }
 
+    MarkAbsoluteFramesForDisplayList(aBuilder, dirtyRect);
+
     nsDisplayLayerEventRegions* eventRegions = nullptr;
     if (aBuilder->IsBuildingLayerEventRegions()) {
       eventRegions = new (aBuilder) nsDisplayLayerEventRegions(aBuilder, this);
       eventRegions->AddFrame(aBuilder, this);
       aBuilder->SetLayerEventRegions(eventRegions);
     }
     aBuilder->AdjustWindowDraggingRegion(this);
     BuildDisplayList(aBuilder, dirtyRect, set);