Skip to content

Commit d44746c

Browse files
committed
Bug 1876262 [wpt PR 44162] - [text-autospace][text-spacing-trim] Update text-spacing shorthand, a=testonly
Automatic update from web-platform-tests [text-autospace][text-spacing-trim] Update `text-spacing` shorthand This patch updates the `text-spacing` shorthand parsing: 1. Update the initial value and supported values as per the resolution at: w3c/csswg-drafts#9511 2. Change the logic to handle `normal` as both properties accept `normal` after the spec change above. 3. Fix the canonical order to match the [spec] (`spacing-trim` comes first). Current supported values of longhands are: * `text-autospace`: `normal`, `no-autospace`. * `text-spacing-trim`: `normal`, `trim-start`, `space-all`, `space-first`. The `text-spacing` shorthands support values above and `none`. [spec]: https://drafts.csswg.org/css-text-4/#text-spacing-property Bug: 1463890, 1463891 Change-Id: I8a047f4b87ba728e2f577301b5a1fc3ce824341e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5232448 Reviewed-by: Anders Hartvoll Ruud Commit-Queue: Koji Ishii Cr-Commit-Position: refs/heads/main{#1251995} -- wpt-commits: 2036f94ae33f010be2e3c994961d902dd56f47e5 wpt-pr: 44162 UltraBlame original commit: 4c40e63ee33115e08d1b3273c4a5762974847f17
1 parent f76c16a commit d44746c

File tree

3 files changed

+226
-0
lines changed

3 files changed

+226
-0
lines changed

testing/web-platform/tests/css/css-text/parsing/text-spacing-computed.html

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,42 @@
257257
spacing
258258
"
259259
"
260+
normal
261+
normal
262+
"
263+
"
264+
normal
265+
"
266+
)
267+
;
268+
test_computed_value
269+
(
270+
"
271+
text
272+
-
273+
spacing
274+
"
275+
"
276+
normal
277+
trim
278+
-
279+
start
280+
"
281+
"
282+
trim
283+
-
284+
start
285+
"
286+
)
287+
;
288+
test_computed_value
289+
(
290+
"
291+
text
292+
-
293+
spacing
294+
"
295+
"
260296
no
261297
-
262298
autospace
@@ -289,6 +325,31 @@
289325
"
290326
)
291327
;
328+
test_computed_value
329+
(
330+
"
331+
text
332+
-
333+
spacing
334+
"
335+
"
336+
no
337+
-
338+
autospace
339+
trim
340+
-
341+
start
342+
"
343+
"
344+
trim
345+
-
346+
start
347+
no
348+
-
349+
autospace
350+
"
351+
)
352+
;
292353
/
293354
/
294355
Test
@@ -304,6 +365,26 @@
304365
spacing
305366
"
306367
"
368+
trim
369+
-
370+
start
371+
normal
372+
"
373+
"
374+
trim
375+
-
376+
start
377+
"
378+
)
379+
;
380+
test_computed_value
381+
(
382+
"
383+
text
384+
-
385+
spacing
386+
"
387+
"
307388
normal
308389
no
309390
-
@@ -336,6 +417,31 @@
336417
"
337418
)
338419
;
420+
test_computed_value
421+
(
422+
"
423+
text
424+
-
425+
spacing
426+
"
427+
"
428+
trim
429+
-
430+
start
431+
no
432+
-
433+
autospace
434+
"
435+
"
436+
trim
437+
-
438+
start
439+
no
440+
-
441+
autospace
442+
"
443+
)
444+
;
339445
<
340446
/
341447
script

testing/web-platform/tests/css/css-text/parsing/text-spacing-invalid.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,20 @@
226226
;
227227
}
228228
}
229+
test_invalid_value
230+
(
231+
"
232+
text
233+
-
234+
spacing
235+
"
236+
normal
237+
normal
238+
no
239+
-
240+
autospace
241+
)
242+
;
229243
<
230244
/
231245
script

testing/web-platform/tests/css/css-text/parsing/text-spacing-valid.html

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,42 @@
249249
spacing
250250
"
251251
"
252+
normal
253+
normal
254+
"
255+
"
256+
normal
257+
"
258+
)
259+
;
260+
test_valid_value
261+
(
262+
"
263+
text
264+
-
265+
spacing
266+
"
267+
"
268+
normal
269+
trim
270+
-
271+
start
272+
"
273+
"
274+
trim
275+
-
276+
start
277+
"
278+
)
279+
;
280+
test_valid_value
281+
(
282+
"
283+
text
284+
-
285+
spacing
286+
"
287+
"
252288
no
253289
-
254290
autospace
@@ -281,6 +317,31 @@
281317
"
282318
)
283319
;
320+
test_valid_value
321+
(
322+
"
323+
text
324+
-
325+
spacing
326+
"
327+
"
328+
no
329+
-
330+
autospace
331+
trim
332+
-
333+
start
334+
"
335+
"
336+
trim
337+
-
338+
start
339+
no
340+
-
341+
autospace
342+
"
343+
)
344+
;
284345
/
285346
/
286347
Test
@@ -296,6 +357,26 @@
296357
spacing
297358
"
298359
"
360+
trim
361+
-
362+
start
363+
normal
364+
"
365+
"
366+
trim
367+
-
368+
start
369+
"
370+
)
371+
;
372+
test_valid_value
373+
(
374+
"
375+
text
376+
-
377+
spacing
378+
"
379+
"
299380
normal
300381
no
301382
-
@@ -328,6 +409,31 @@
328409
"
329410
)
330411
;
412+
test_valid_value
413+
(
414+
"
415+
text
416+
-
417+
spacing
418+
"
419+
"
420+
trim
421+
-
422+
start
423+
no
424+
-
425+
autospace
426+
"
427+
"
428+
trim
429+
-
430+
start
431+
no
432+
-
433+
autospace
434+
"
435+
)
436+
;
331437
<
332438
/
333439
script

0 commit comments

Comments
 (0)