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 : f9dbd7ac8457bd0428402db3f856f0f96b1e1ecc
This commit is contained in:
Hiroyuki Ikezoe 2016-11-28 14:19:40 +09:00
Родитель ced5e33c0a
Коммит 6f58b63037
4 изменённых файлов: 39 добавлений и 1 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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
== table-overflowed-by-animation.html table-overflowed-by-animation-ref.html

Просмотреть файл

@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
<table style="width: 100px; height: 100px;">
<td style="transform: rotateZ(45deg); background-color: rgb(212, 61, 188);">
</td>
</table>
</html>

Просмотреть файл

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html class="reftest-wait">
<style>
@keyframes anim {
/*
* We need to use different transform functions to produce
* UpdatePostTransformOverflow change hint, also these functions have to be
* the same matrix to being the same position while running reftest.
*/
from {
transform: rotate(0deg);
}
to {
transform: scale(1);
}
}
</style>
<table id="test" style="width: 100px; height: 100px; animation: anim 1s infinite;">
<td style="transform: rotateZ(45deg); background-color: rgb(212, 61, 188);">
</td>
</table>
<script>
document.getElementById("test").addEventListener("animationstart", () => {
requestAnimationFrame(() => {
document.documentElement.classList.remove("reftest-wait");
});
}, false);
</script>
</html>