aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2023-04-27 01:40:29 +0200
committerOriol Brufau <obrufau@igalia.com>2023-04-27 23:48:53 +0200
commit668c4c8abab1b0af8a8e0eca9bb4567b1c7b364e (patch)
treed37069fbf59ae44d572389542d273b5b433fafe8 /tests
parent7eca93bb7a1f5a87e50a5fadcd16adbfb79d566e (diff)
downloadservo-668c4c8abab1b0af8a8e0eca9bb4567b1c7b364e.tar.gz
servo-668c4c8abab1b0af8a8e0eca9bb4567b1c7b364e.zip
Round text decoration thickness to >= 1 device pixels
Previously the thickness coming from font metrics could be something like 0.7px, so with 1dppx it would be painted as either 1 or 0 device pixels. Enforcing at least 1 device pixel ensures that the decoration will be visible, and rounding to an integral amount of device pixels ensures that the thickness won't vary depending on the position. The specification requires this behavior when text-decoration-thickness is set to a length or percentage. It's not clear if it should also happen by default, but this seems to match other browsers (except for WebKit rounding up instead of to the nearest integer). The test text-decoration-thickness-from-zero-sized-font.html is now failing because of #29675.
Diffstat (limited to 'tests')
-rw-r--r--tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html.ini2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html.ini
new file mode 100644
index 00000000000..ba4be2d12c7
--- /dev/null
+++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html.ini
@@ -0,0 +1,2 @@
+[text-decoration-thickness-from-zero-sized-font.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html.ini b/tests/wpt/metadata/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html.ini
new file mode 100644
index 00000000000..ba4be2d12c7
--- /dev/null
+++ b/tests/wpt/metadata/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html.ini
@@ -0,0 +1,2 @@
+[text-decoration-thickness-from-zero-sized-font.html]
+ expected: FAIL