Skip to content

Commit 0146097

Browse files
jja08111chromium-wpt-export-bot
authored andcommitted
Fix incorrect usage of percentage unit in tab-size test
This CL changes the incorrect use of `word-spacing: 100%` to `1ch` in the `tab-size-spacing-003.html` test. In CSS Text Level 4, percentage values for word-spacing are defined to resolve against the computed font-size of the element, not the advance width of the space character. Meanwhile, tab-size is defined as a multiple of the advance width of U+0020. As a result, comparing tab-size alignment to spacing derived from `word-spacing: 100%` mixes unrelated units and leads to an invalid test condition. This patch replaces the percentage value with `1ch` to preserve the test intent while ensuring spec compliance. Specs: - https://www.w3.org/TR/css-text-4/#word-spacing-property - https://www.w3.org/TR/css-text-3/#tab-size-property Bug: 41435273 Change-Id: If1564727af832210af495096bd46786b80969f29 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6815996 Reviewed-by: Kent Tamura <[email protected]> Reviewed-by: Koji Ishii <[email protected]> Commit-Queue: Minseong Kim <[email protected]> Cr-Commit-Position: refs/heads/main@{#1498615}
1 parent 7a347d4 commit 0146097

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

css/css-text/tab-size/tab-size-spacing-003.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
white-space: pre;
1313
}
1414
.test {
15-
word-spacing: 100%; /* effectively double the size of SPACE, and hence of tabs */
15+
word-spacing: 1ch; /* effectively double the size of SPACE, and hence of tabs */
1616
tab-size: 3;
1717
}
1818
.ref1 {
19-
word-spacing: 100%;
19+
word-spacing: 1ch;
2020
}
2121
.ref2 {
2222
white-space: pre;

0 commit comments

Comments
 (0)