Bug 1344971 - Part 3: Check NS_FRAME_MAY_BE_TRANSFORMED as part of Extend3DContext. r?thinker draft
authorMatt Woodrow <mwoodrow@mozilla.com>
Tue, 07 Mar 2017 14:07:32 +1300
changeset 494303 6b0b18e0f7e22ef34c824e4d80349c42cd587049
parent 494302 637e3ce6df84ea520f34b8a8d691fce5f792bf8b
child 494304 a711a499b9174c5531cf51106979e0d937a74a3d
push id48011
push usermwoodrow@mozilla.com
push dateTue, 07 Mar 2017 01:18:12 +0000
reviewersthinker
bugs1344971
milestone55.0a1
Bug 1344971 - Part 3: Check NS_FRAME_MAY_BE_TRANSFORMED as part of Extend3DContext. r?thinker MozReview-Commit-ID: EynrHtzIz2s
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1225,16 +1225,19 @@ nsIFrame::IsSVGTransformed(gfx::Matrix *
                            gfx::Matrix *aFromParentTransforms) const
 {
   return false;
 }
 
 bool
 nsIFrame::Extend3DContext() const
 {
+  if (!(mState & NS_FRAME_MAY_BE_TRANSFORMED)) {
+    return false;
+  }
   const nsStyleDisplay* disp = StyleDisplay();
   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 (GetType() == nsGkAtoms::scrollFrame) {