Bug 1512244 - Part 4: Avoid call to GetContent() r=mattwoodrow
authorMiko Mynttinen <mikokm@gmail.com>
Fri, 04 Jan 2019 18:31:21 +0000
changeset 509676 c608a75ea9c8b324614e2de81dcbea1fc1902525
parent 509675 6df75e023fc2a37009b8e3759d94b6e7bed5b570
child 509677 88de1411e7f47f1cff6aa7839d70db7743e79edf
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 4: Avoid call to GetContent() r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D13833
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -3465,18 +3465,18 @@ void nsIFrame::BuildDisplayListForChild(
 
   nsIFrame* child = aChild;
   aBuilder->RemoveFromWillChangeBudget(child);
   const bool isPaintingToWindow = aBuilder->IsPaintingToWindow();
 
   const bool doingShortcut =
       isPaintingToWindow &&
       (child->GetStateBits() & NS_FRAME_SIMPLE_DISPLAYLIST) &&
-      // Animations may change the value of |HasOpacity()|.
-      !(child->GetContent() && child->GetContent()->MayHaveAnimations());
+      // Animations may change the stacking context state.
+      !(child->MayHaveTransformAnimation() || child->MayHaveOpacityAnimation());
 
   // dirty rect in child-relative coordinates
   NS_ASSERTION(aBuilder->GetCurrentFrame() == this, "Wrong coord space!");
   const nsPoint offset = child->GetOffsetTo(this);
   nsRect visible = aBuilder->GetVisibleRect() - offset;
   nsRect dirty = aBuilder->GetDirtyRect() - offset;
 
   if (doingShortcut) {