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
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1541,16 +1541,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)->