Bug 1273042 - Part 2: Create stacking context for transform animations whose style is transform:none. r=mattwoodrow
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Wed, 01 Jun 2016 16:24:34 +0900
changeset 338914 df16848a29e356152b3374344a4e279a0dc05235
parent 338913 d3c0af860e07e8bb805f591a4d85a25416d9cd85
child 338915 8976b91b9ad2bbb143a204adf07565d23cea1f3b
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1273042
milestone49.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 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.
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()) {