Bug 1463605 - Check mMayHaveOpacityAnimation in nsFrame::HasOpacityInternal(). r=birtles
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 23 May 2018 18:15:12 +0900
changeset 419629 9dacb05350d80c4e5591de4d7f10c766b969103e
parent 419628 3025063ca800a38bf0f3b30e577806f67cf3dbe8
child 419630 abf79f352837374a27211f78c1b934bb898ee9c9
push id34040
push userebalazs@mozilla.com
push dateThu, 24 May 2018 09:37:05 +0000
treeherdermozilla-central@c411ccb6bb4a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1463605
milestone62.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 1463605 - Check mMayHaveOpacityAnimation in nsFrame::HasOpacityInternal(). r=birtles If the mMayHaveOpacityAnimation is false there, we don't need to check opacity animations at all. MozReview-Commit-ID: LTYPPXzF8V6
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1548,16 +1548,20 @@ nsIFrame::HasOpacityInternal(float aThre
                              EffectSet* aEffectSet) const
 {
   MOZ_ASSERT(0.0 <= aThreshold && aThreshold <= 1.0, "Invalid argument");
   if (StyleEffects()->mOpacity < aThreshold ||
       (StyleDisplay()->mWillChangeBitField & NS_STYLE_WILL_CHANGE_OPACITY)) {
     return true;
   }
 
+  if (!mMayHaveOpacityAnimation) {
+    return false;
+  }
+
   EffectSet* effects =
     aEffectSet ? aEffectSet : EffectSet::GetEffectSet(this);
   if (!effects) {
     return false;
   }
 
   return ((IsPrimaryFrame() ||
            nsLayoutUtils::FirstContinuationOrIBSplitSibling(this)->