Bug 1273042 - Part 2: Create stacking context for transform animations whose style is transform:none. r?mattwoodrow draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Wed, 01 Jun 2016 14:03:28 +0900
changeset 373730 5d89b02d5bb668ca8b9c997dcd3a7d74a34fd2f1
parent 373729 1fccade62bb442426bd489cc7daf138c214c0ca4
child 373731 67c53453e7b6b0edb602cb4902831b1e3ca173ba
push id19823
push userbmo:hiikezoe@mozilla-japan.org
push dateWed, 01 Jun 2016 05:08:10 +0000
reviewersmattwoodrow
bugs1273042
milestone49.0a1
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
layout/generic/nsFrame.cpp
--- 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()) {