Don't make layers active if the CSS property is active. draft
authorMarkus Stange <mstange@themasta.com>
Fri, 31 Mar 2017 17:45:09 -0400
changeset 558683 46e9b9b4c9c16833b791f0a55f8600d0630efd38
parent 558682 8c4cf5136bbe695a8f45765bb2b97047b032d7d2
child 558684 366b2d8c4c79a229a0b457f75aefc96dbb12e695
push id52932
push userbmo:mstange@themasta.com
push dateFri, 07 Apr 2017 22:09:18 +0000
milestone55.0a1
Don't make layers active if the CSS property is active. MozReview-Commit-ID: AE6gzQ6tsiy
layout/base/RestyleManager.cpp
layout/painting/ActiveLayerTracker.cpp
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -1085,17 +1085,16 @@ DoApplyRenderingChangeToTree(nsIFrame* a
         MOZ_ASSERT(false, "unexpected frame got nsChangeHint_UpdateTextPath");
       }
     }
     if (aChange & nsChangeHint_UpdateOpacityLayer) {
       // FIXME/bug 796697: we can get away with empty transactions for
       // opacity updates in many cases.
       needInvalidatingPaint = true;
 
-      ActiveLayerTracker::NotifyRestyle(aFrame, eCSSProperty_opacity);
       if (nsSVGIntegrationUtils::UsingEffectsForFrame(aFrame)) {
         // SVG effects paints the opacity without using
         // nsDisplayOpacity. We need to invalidate manually.
         aFrame->InvalidateFrameSubtree();
       }
     }
     if ((aChange & nsChangeHint_UpdateTransformLayer) &&
         aFrame->IsTransformed()) {
--- a/layout/painting/ActiveLayerTracker.cpp
+++ b/layout/painting/ActiveLayerTracker.cpp
@@ -428,16 +428,18 @@ ActiveLayerTracker::IsStyleAnimated(nsDi
     return true;
   }
   if ((aFrame->StyleDisplay()->mWillChangeBitField & NS_STYLE_WILL_CHANGE_OPACITY) &&
       aProperty == eCSSProperty_opacity &&
       (!aBuilder || aBuilder->IsInWillChangeBudget(aFrame, aFrame->GetSize()))) {
     return true;
   }
 
+  return false;
+
   LayerActivity* layerActivity = GetLayerActivity(aFrame);
   if (layerActivity) {
     LayerActivity::ActivityIndex activityIndex = LayerActivity::GetActivityIndexForProperty(aProperty);
     if (layerActivity->mRestyleCounts[activityIndex] >= 2) {
       return true;
     }
     if (CheckScrollInducedActivity(layerActivity, activityIndex, aBuilder)) {
       return true;