commit | 07d6363ec02df86f349565086329d41253ad8658 | [log] [tgz] |
---|---|---|
author | Boris Chiou <boris.chiou@gmail.com> | Wed Aug 23 18:29:12 2023 |
committer | moz-wptsync-bot <wptsync@mozilla.com> | Thu Aug 24 04:10:20 2023 |
tree | 73b918fef39c1df18d6661f3cdcc867f96e97cc2 | |
parent | da13982b1e0444c7803d2deb7fad32f021f49353 [diff] |
Update wpt for the serialization of transform when display is none. Per spec, the resolved value of `transform` shouldn't depend on display value. https://drafts.csswg.org/css-transforms-2/#serialization-of-the-computed-value Differential Revision: https://phabricator.services.mozilla.com/D186506 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1841292 gecko-commit: 80d5d57caeb925fac97b2030e760652f5f78c49f gecko-reviewers: emilio
diff --git a/css/css-transforms/transform-2d-getComputedStyle-001.html b/css/css-transforms/transform-2d-getComputedStyle-001.html index b6a2a7c..804b626 100644 --- a/css/css-transforms/transform-2d-getComputedStyle-001.html +++ b/css/css-transforms/transform-2d-getComputedStyle-001.html
@@ -75,8 +75,15 @@ } function clear(id) { const element = document.getElementById(id); + const value = window.getComputedStyle(element).transform; element.style.display = 'none'; - assert_equals(window.getComputedStyle(element).getPropertyValue("transform"), "none", "Computed style for an element with 'display: none' should be 'transform: none'"); + // Per spec, the resolved value doesn't depend on display value. + // https://drafts.csswg.org/css-transforms-2/#serialization-of-the-computed-value + // https://github.com/w3c/csswg-drafts/issues/9121 + assert_equals( + window.getComputedStyle(element).transform, value, + "Computed style for an element with 'display: none' " + + "shouldn't be changed"); } test(function() {