Skip to content

Commit f87a800

Browse files
committed
[css-logical] split logical shorthand relative prioritization animation test off from css/css-logical/animation-001.html as a dedicated tentative test
https://bugs.webkit.org/show_bug.cgi?id=278910 rdar://135006627 Reviewed by Anne van Kesteren. Given the `logical` keyword for the `margin` shorthand, and other relative shorthands, is not stable yet, as discussed in w3c/csswg-drafts#1282, we split off the test in `css/css-logical/animation-001.html` that relies on this feature and make a new test file marked `.tentative`. * LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-001-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-001.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animations/logical-shorthand-relative-prioritization-by-number-of-components.tentative-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animations/logical-shorthand-relative-prioritization-by-number-of-components.tentative.html: Added. Canonical link: https://commits.webkit.org/282961@main
1 parent 0dc1a7e commit f87a800

4 files changed

+34
-18
lines changed

LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-001-expected.txt

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ PASS Logical properties in animations respect the direction
77
PASS Physical properties win over logical properties in object notation
88
PASS Physical properties win over logical properties in array notation
99
PASS Physical properties with variables win over logical properties
10-
FAIL Logical shorthands follow the usual prioritization based on number of component longhands assert_equals: expected "300px" but got "0px"
1110
PASS Physical longhands win over logical shorthands
1211
PASS Logical longhands win over physical shorthands
1312
PASS Physical shorthands win over logical shorthands

LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-001.html

-17
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,6 @@
101101
assert_equals(getComputedStyle(div).height, '250px');
102102
}, 'Physical properties with variables win over logical properties');
103103

104-
test(t => {
105-
const div = addDiv(t);
106-
const anim = div.animate(
107-
{
108-
marginInlineStart: '100px',
109-
marginInline: '200px',
110-
margin: 'logical 300px',
111-
},
112-
{ duration: 1, easing: 'step-start' }
113-
);
114-
assert_equals(getComputedStyle(div).marginLeft, '100px');
115-
assert_equals(getComputedStyle(div).marginRight, '200px');
116-
assert_equals(getComputedStyle(div).marginTop, '300px');
117-
assert_equals(getComputedStyle(div).marginBottom, '300px');
118-
}, 'Logical shorthands follow the usual prioritization based on number of'
119-
+ ' component longhands');
120-
121104
test(t => {
122105
const div = addDiv(t);
123106
const anim = div.animate(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
FAIL Logical shorthands follow the usual prioritization based on number of component longhands assert_equals: expected "300px" but got "0px"
3+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!doctype html>
2+
<meta charset=utf-8>
3+
<title>Logical shorthands follow the usual prioritization based on number of component longhands</title>
4+
<link rel="help" href="https://drafts.csswg.org/web-animations-1/#calculating-computed-keyframes">
5+
<meta name="assert" content="Shorthand properties with fewer longhand components override those with more longhand components (e.g. border-top overrides border-color).">
6+
<script src="/resources/testharness.js"></script>
7+
<script src="/resources/testharnessreport.js"></script>
8+
<script src="../../css-animations/support/testcommon.js"></script>
9+
10+
<div id="log"></div>
11+
<script>
12+
'use strict';
13+
14+
test(t => {
15+
const div = addDiv(t);
16+
const anim = div.animate(
17+
{
18+
marginInlineStart: '100px',
19+
marginInline: '200px',
20+
margin: 'logical 300px',
21+
},
22+
{ duration: 1, easing: 'step-start' }
23+
);
24+
assert_equals(getComputedStyle(div).marginLeft, '100px');
25+
assert_equals(getComputedStyle(div).marginRight, '200px');
26+
assert_equals(getComputedStyle(div).marginTop, '300px');
27+
assert_equals(getComputedStyle(div).marginBottom, '300px');
28+
}, 'Logical shorthands follow the usual prioritization based on number of'
29+
+ ' component longhands');
30+
31+
</script>

0 commit comments

Comments
 (0)