Bug 1344971 - Part 3: Check NS_FRAME_MAY_BE_TRANSFORMED as part of Extend3DContext. r?thinker
MozReview-Commit-ID: EynrHtzIz2s
--- 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) {