Bug 1273042 - Part 2: Create stacking context for transform animations whose style is transform:none. r?mattwoodrow
To create stacking context for transform animations whose style is
transform:none, we need to check the frame has transform animations
regardless of current transform style.
MozReview-Commit-ID: IEVu93sY7ii
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -550,17 +550,19 @@ nsFrame::Init(nsIContent* aContent
NS_FRAME_IS_NONDISPLAY);
if (HasAnyStateBits(NS_FRAME_IN_POPUP) && TrackingVisibility()) {
// Assume all frames in popups are visible.
IncVisibilityCount(VisibilityCounter::IN_DISPLAYPORT);
}
}
const nsStyleDisplay *disp = StyleDisplay();
- if (disp->HasTransform(this)) {
+ if (disp->HasTransform(this) ||
+ EffectCompositor::HasAnimationsForCompositor(this,
+ eCSSProperty_transform)) {
// The frame gets reconstructed if we toggle the -moz-transform
// property, so we can set this bit here and then ignore it.
mState |= NS_FRAME_MAY_BE_TRANSFORMED;
}
if (disp->mPosition == NS_STYLE_POSITION_STICKY &&
!aPrevInFlow &&
!(mState & NS_FRAME_IS_NONDISPLAY) &&
!disp->IsInnerTableStyle()) {