Bug 1344971 - Part 2: Check NS_FRAME_MAY_BE_TRANSFORMED as part of Extend3DContext. r=thinker
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 07 Mar 2017 14:07:32 +1300
changeset 449070 6805a1db0a08ac2fd820bfca43391718abf42f50
parent 449069 9e03e3a670acbe537621dc4da1c9fb05b6e9e839
child 449071 5895e9f4bc68e23cff73d4356a64631c1c99784e
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersthinker
bugs1344971
milestone59.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 1344971 - Part 2: Check NS_FRAME_MAY_BE_TRANSFORMED as part of Extend3DContext. r=thinker
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1552,16 +1552,19 @@ nsIFrame::IsSVGTransformed(gfx::Matrix *
                            gfx::Matrix *aFromParentTransforms) const
 {
   return false;
 }
 
 bool
 nsIFrame::Extend3DContext(const nsStyleDisplay* aStyleDisplay, mozilla::EffectSet* aEffectSet) const
 {
+  if (!(mState & NS_FRAME_MAY_BE_TRANSFORMED)) {
+    return false;
+  }
   const nsStyleDisplay* disp = StyleDisplayWithOptionalParam(aStyleDisplay);
   if (disp->mTransformStyle != NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D ||
       !IsFrameOfType(nsIFrame::eSupportsCSSTransforms)) {
     return false;
   }
 
   // If we're all scroll frame, then all descendants will be clipped, so we can't preserve 3d.
   if (IsScrollFrame()) {