Bug 1512244 - Part 8: Use common path in more cases r=mattwoodrow
authorMiko Mynttinen <mikokm@gmail.com>
Fri, 04 Jan 2019 18:33:15 +0000
changeset 509680 35dc9703f35828c01e960e5d1e52fc96620afd85
parent 509679 75084adf55a7a992ab00ef777086fdccf3e0f57c
child 509681 606aa2a9d0b28592538bbf77405ac10dda993df0
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1512244
milestone66.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 1512244 - Part 8: Use common path in more cases r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D13837
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -3671,21 +3671,19 @@ void nsIFrame::BuildDisplayListForChild(
       aBuilder->IntersectDirtyRect(*clipPropClip);
       clipState.ClipContentDescendants(*clipPropClip +
                                        aBuilder->ToReferenceFrame(child));
       awayFromCommonPath = true;
     }
 
     child->MarkAbsoluteFramesForDisplayList(aBuilder);
 
-    const bool differentAGR =
-        buildingForChild.IsAnimatedGeometryRoot() || isPositioned;
-
-    if (!awayFromCommonPath && !differentAGR &&
-        !buildingForChild.MaybeAnimatedGeometryRoot()) {
+    const bool differentAGR = buildingForChild.IsAnimatedGeometryRoot();
+
+    if (!awayFromCommonPath) {
       // The shortcut is available for the child for next time.
       child->AddStateBits(NS_FRAME_SIMPLE_DISPLAYLIST);
     }
 
     if (!pseudoStackingContext) {
       // THIS IS THE COMMON CASE.
       // Not a pseudo or real stacking context. Do the simple thing and
       // return early.
@@ -3706,17 +3704,17 @@ void nsIFrame::BuildDisplayListForChild(
 
     // A pseudo-stacking context (e.g., a positioned element with z-index auto).
     // We allow positioned descendants of the child to escape to our parent
     // stacking context's positioned descendant list, because they might be
     // z-index:non-auto
     nsDisplayListCollection pseudoStack(aBuilder);
 
     aBuilder->BuildCompositorHitTestInfoIfNeeded(
-        child, pseudoStack.BorderBackground(), differentAGR);
+        child, pseudoStack.BorderBackground(), differentAGR || isPositioned);
 
     aBuilder->AdjustWindowDraggingRegion(child);
     nsDisplayListBuilder::AutoContainerASRTracker contASRTracker(aBuilder);
     aBuilder->Check();
     child->BuildDisplayList(aBuilder, pseudoStack);
     aBuilder->Check();
     if (aBuilder->DisplayCaret(child, pseudoStack.Content())) {
       canSkipWrapList = false;