Skip to content

Commit 2a6bb4b

Browse files
kojiishichromium-wpt-export-bot
authored andcommitted
[text-box-trim] Change text-box-edge to require two values
This patch changes the `text-box-edge` property to require two values if the `over` and the `under` are different, as per the resolution at the CSS WG[1]: [1]: w3c/csswg-drafts#10703 Bug: 373867786, 40254880 Change-Id: I385bf5fa1fdb45cd6990f1a079878f5a683d8712
1 parent 45e1371 commit 2a6bb4b

9 files changed

+32
-33
lines changed

css/css-inline/text-box-trim/parsing/inheritance.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
<div id="target"></div>
1010
</div>
1111
<script>
12-
assert_inherited('text-box-edge', 'auto', 'cap');
12+
assert_inherited('text-box-edge', 'auto', 'cap text');
1313
assert_not_inherited('text-box-trim', 'none', 'trim-start');
1414
</script>

css/css-inline/text-box-trim/parsing/text-box-computed.html

+8-9
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
// `<text-edge>`
2222
test_computed_value('text-box', 'text');
23-
test_computed_value('text-box', 'cap');
2423
test_computed_value('text-box', 'ideographic');
2524
test_computed_value('text-box', 'cap alphabetic');
2625
test_computed_value('text-box', 'text alphabetic');
@@ -31,8 +30,8 @@
3130
test_computed_value('text-box', 'auto trim-both', 'trim-both');
3231
test_computed_value('text-box', 'none text', 'none text');
3332
test_computed_value('text-box', 'text text none', 'none text');
34-
test_computed_value('text-box', 'none cap', 'none cap');
35-
test_computed_value('text-box', 'cap ideographic none', 'none cap ideographic');
33+
test_computed_value('text-box', 'none cap text');
34+
test_computed_value('text-box', 'cap alphabetic none', 'none cap alphabetic');
3635
test_computed_value('text-box', 'ideographic none', 'none ideographic');
3736

3837
// Both `<text-box-trim>` and `<text-box-edge>`
@@ -45,10 +44,10 @@
4544
test_computed_value('text-box', 'trim-both cap alphabetic', 'cap alphabetic');
4645
test_computed_value('text-box', 'trim-start ideographic ideographic', 'trim-start ideographic');
4746
test_computed_value('text-box', 'trim-start ideographic-ink ideographic-ink', 'trim-start ideographic-ink');
48-
test_computed_value('text-box', 'trim-end cap text', 'trim-end cap');
49-
test_computed_value('text-box', 'trim-end ex text', 'trim-end ex');
50-
test_computed_value('text-box', 'cap text trim-end', 'trim-end cap');
51-
test_computed_value('text-box', 'ex text trim-end', 'trim-end ex');
52-
test_computed_value('text-box', 'cap text trim-both', 'cap');
53-
test_computed_value('text-box', 'ex text trim-both', 'ex');
47+
test_computed_value('text-box', 'trim-end cap text');
48+
test_computed_value('text-box', 'trim-end ex text', 'trim-end ex text');
49+
test_computed_value('text-box', 'cap text trim-end', 'trim-end cap text');
50+
test_computed_value('text-box', 'ex text trim-end', 'trim-end ex text');
51+
test_computed_value('text-box', 'cap text trim-both', 'cap text');
52+
test_computed_value('text-box', 'ex text trim-both', 'ex text');
5453
</script>

css/css-inline/text-box-trim/parsing/text-box-edge-computed.html

+2-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
<script>
1010
test_computed_value('text-box-edge', 'auto');
1111
test_computed_value('text-box-edge', 'text');
12-
test_computed_value('text-box-edge', 'cap');
13-
test_computed_value('text-box-edge', 'ex');
1412
test_computed_value('text-box-edge', 'ideographic');
1513
test_computed_value('text-box-edge', 'ideographic-ink');
1614

@@ -19,12 +17,12 @@
1917
test_computed_value('text-box-edge', 'text ideographic');
2018
test_computed_value('text-box-edge', 'text ideographic-ink');
2119

22-
test_computed_value('text-box-edge', 'cap text', 'cap');
20+
test_computed_value('text-box-edge', 'cap text');
2321
test_computed_value('text-box-edge', 'cap alphabetic');
2422
test_computed_value('text-box-edge', 'cap ideographic');
2523
test_computed_value('text-box-edge', 'cap ideographic-ink');
2624

27-
test_computed_value('text-box-edge', 'ex text', 'ex');
25+
test_computed_value('text-box-edge', 'ex text');
2826
test_computed_value('text-box-edge', 'ex alphabetic');
2927
test_computed_value('text-box-edge', 'ex ideographic');
3028
test_computed_value('text-box-edge', 'ex ideographic-ink');

css/css-inline/text-box-trim/parsing/text-box-edge-invalid.html

+5
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,9 @@
3737
test_invalid_value('text-box-edge', 'auto text');
3838
test_invalid_value('text-box-edge', 'text auto');
3939
test_invalid_value('text-box-edge', 'text text text');
40+
41+
// These `over` values can't omit the `under` value.
42+
// https://github.com/w3c/csswg-drafts/issues/10703
43+
test_invalid_value('text-box-edge', 'cap');
44+
test_invalid_value('text-box-edge', 'ex');
4045
</script>

css/css-inline/text-box-trim/parsing/text-box-edge-valid.html

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
<script>
99
test_valid_value('text-box-edge', 'auto');
1010
test_valid_value('text-box-edge', 'text');
11-
test_valid_value('text-box-edge', 'cap');
12-
test_valid_value('text-box-edge', 'ex');
1311
test_valid_value('text-box-edge', 'ideographic');
1412
test_valid_value('text-box-edge', 'ideographic-ink');
1513

@@ -18,12 +16,12 @@
1816
test_valid_value('text-box-edge', 'text ideographic');
1917
test_valid_value('text-box-edge', 'text ideographic-ink');
2018

21-
test_valid_value('text-box-edge', 'cap text', 'cap');
19+
test_valid_value('text-box-edge', 'cap text');
2220
test_valid_value('text-box-edge', 'cap alphabetic');
2321
test_valid_value('text-box-edge', 'cap ideographic');
2422
test_valid_value('text-box-edge', 'cap ideographic-ink');
2523

26-
test_valid_value('text-box-edge', 'ex text', 'ex');
24+
test_valid_value('text-box-edge', 'ex text');
2725
test_valid_value('text-box-edge', 'ex alphabetic');
2826
test_valid_value('text-box-edge', 'ex ideographic');
2927
test_valid_value('text-box-edge', 'ex ideographic-ink');

css/css-inline/text-box-trim/parsing/text-box-shorthand.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
'text-box-edge': 'auto',
2121
});
2222

23-
test_shorthand_value('text-box', 'ex', {
23+
test_shorthand_value('text-box', 'ex text', {
2424
'text-box-trim': 'trim-both',
25-
'text-box-edge': 'ex',
25+
'text-box-edge': 'ex text',
2626
});
2727
</script>

css/css-inline/text-box-trim/parsing/text-box-valid.html

+8-9
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
// `<text-edge>`
2222
test_valid_value('text-box', 'text');
23-
test_valid_value('text-box', 'cap');
2423
test_valid_value('text-box', 'ideographic');
2524
test_valid_value('text-box', 'cap alphabetic');
2625
test_valid_value('text-box', 'text alphabetic');
@@ -31,8 +30,8 @@
3130
test_valid_value('text-box', 'auto trim-both', 'trim-both');
3231
test_valid_value('text-box', 'none text', 'none text');
3332
test_valid_value('text-box', 'text text none', 'none text');
34-
test_valid_value('text-box', 'none cap', 'none cap');
35-
test_valid_value('text-box', 'cap ideographic none', 'none cap ideographic');
33+
test_valid_value('text-box', 'none cap text');
34+
test_valid_value('text-box', 'cap alphabetic none', 'none cap alphabetic');
3635
test_valid_value('text-box', 'ideographic none', 'none ideographic');
3736

3837
// Both `<text-box-trim>` and `<text-box-edge>`
@@ -45,10 +44,10 @@
4544
test_valid_value('text-box', 'trim-both cap alphabetic', 'cap alphabetic');
4645
test_valid_value('text-box', 'trim-start ideographic ideographic', 'trim-start ideographic');
4746
test_valid_value('text-box', 'trim-start ideographic-ink ideographic-ink', 'trim-start ideographic-ink');
48-
test_valid_value('text-box', 'trim-end cap text', 'trim-end cap');
49-
test_valid_value('text-box', 'trim-end ex text', 'trim-end ex');
50-
test_valid_value('text-box', 'cap text trim-end', 'trim-end cap');
51-
test_valid_value('text-box', 'ex text trim-end', 'trim-end ex');
52-
test_valid_value('text-box', 'cap text trim-both', 'cap');
53-
test_valid_value('text-box', 'ex text trim-both', 'ex');
47+
test_valid_value('text-box', 'trim-end cap text');
48+
test_valid_value('text-box', 'trim-end ex text');
49+
test_valid_value('text-box', 'cap text trim-end', 'trim-end cap text');
50+
test_valid_value('text-box', 'ex text trim-end', 'trim-end ex text');
51+
test_valid_value('text-box', 'cap text trim-both', 'cap text');
52+
test_valid_value('text-box', 'ex text trim-both', 'ex text');
5453
</script>

css/css-inline/text-box-trim/text-box-trim-end-001.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
.auto .target { text-box-edge: auto; }
3131
.text .target { text-box-edge: text; }
3232
.alphabetic .target { text-box-edge: text alphabetic; }
33-
.cap .target { text-box-edge: cap; }
34-
.ex .target { text-box-edge: ex; }
33+
.cap .target { text-box-edge: cap text; }
34+
.ex .target { text-box-edge: ex text; }
3535
</style>
3636
<div class="spacer"></div>
3737
<div class="target">ApÉx</div>

css/css-inline/text-box-trim/text-box-trim-start-001.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
.vlr { writing-mode: vertical-lr; }
3131
.auto .target { text-box-edge: auto; }
3232
.text .target { text-box-edge: text; }
33-
.cap .target { text-box-edge: cap; }
34-
.ex .target { text-box-edge: ex; }
33+
.cap .target { text-box-edge: cap text; }
34+
.ex .target { text-box-edge: ex text; }
3535
.vlr.alphabetic
3636
.target { text-box-edge: text alphabetic; }
3737
</style>

0 commit comments

Comments
 (0)