From f94cef05e4ce1e1006fcbe86e7cacad9c070b2c3 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Mon, 28 Nov 2016 14:19:40 +0900 Subject: [PATCH] Bug 1319378 - Don't set NS_FRAME_MAY_BE_TRANSFORMED against nsIFrame that does not support transforms. r=dbaron MozReview-Commit-ID: CuDA14ktcDL --HG-- extra : rebase_source : 56ae5f6299391db62148ee562bc85f40b66c1d1f --- layout/generic/nsFrame.cpp | 3 +- layout/reftests/transform/reftest.list | 1 + .../table-overflowed-by-animation-ref.html | 7 +++++ .../table-overflowed-by-animation.html | 29 +++++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 layout/reftests/transform/table-overflowed-by-animation-ref.html create mode 100644 layout/reftests/transform/table-overflowed-by-animation.html diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 49d8c2aacff4..00331b830bb6 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -555,7 +555,8 @@ nsFrame::Init(nsIContent* aContent, } const nsStyleDisplay *disp = StyleDisplay(); if (disp->HasTransform(this) || - nsLayoutUtils::HasAnimationOfProperty(this, eCSSProperty_transform)) { + (IsFrameOfType(eSupportsCSSTransforms) && + nsLayoutUtils::HasAnimationOfProperty(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; diff --git a/layout/reftests/transform/reftest.list b/layout/reftests/transform/reftest.list index 11e030096629..57ad466730d6 100644 --- a/layout/reftests/transform/reftest.list +++ b/layout/reftests/transform/reftest.list @@ -139,3 +139,4 @@ pref(svg.transform-box.enabled,true) == transform-box-svg-2b.svg transform-box-s == animate-layer-scale-inherit-3.html animate-layer-scale-inherit-1-ref.html # Bug 1301500 == dynamic-add-without-change-cb-1.html dynamic-add-without-change-cb-1-ref.html +fuzzy-if(d2d,1,5) == table-overflowed-by-animation.html table-overflowed-by-animation-ref.html diff --git a/layout/reftests/transform/table-overflowed-by-animation-ref.html b/layout/reftests/transform/table-overflowed-by-animation-ref.html new file mode 100644 index 000000000000..242dc53506c1 --- /dev/null +++ b/layout/reftests/transform/table-overflowed-by-animation-ref.html @@ -0,0 +1,7 @@ + + + + +
+
+ diff --git a/layout/reftests/transform/table-overflowed-by-animation.html b/layout/reftests/transform/table-overflowed-by-animation.html new file mode 100644 index 000000000000..d3d2b835578b --- /dev/null +++ b/layout/reftests/transform/table-overflowed-by-animation.html @@ -0,0 +1,29 @@ + + + + + +
+
+ +