tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 683d92f04a4cb336530dadf09d4866507717aa9d
parent 754892ef9425c268d2025968424547bee428c777
Author: Andreu Botella <abotella@igalia.com>
Date:   Wed, 15 Oct 2025 08:21:03 +0000

Bug 1993472 [wpt PR 55307] - [line-clamp] Change WPT tests with buggy linebreaking behavior, a=testonly

Automatic update from web-platform-tests
[line-clamp] Change WPT tests with buggy linebreaking behavior

In some WPT tests that use a monospace font and `ch` widths to test
linebreaking, sometimes Chromium will break at an earlier break
opportunity than expected. This might be due to differences in the
font metrics that round up when converted to a `LayoutUnit` and can
accumulate across multiple line items. This also seems to be
platform-dependent, possibly depending on the text rendering stack and
other factors.

An easy workaround is to increase the line width by 0.1ch, which
(assuming only monospace text at a single font size) should prevent
this issue while not affecting anything else in the test.

This patch changes two line-clamp tests to work around this issue.

Bug: 40336192
Change-Id: I67f531bf3f95417e38bbdbb1b7e4b673dc3241aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7003688
Commit-Queue: Andreu Botella <abotella@igalia.com>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1526907}

--

wpt-commits: 205ec9731b8abfe68d920fd6c0b49f81b35ebfad
wpt-pr: 55307

Diffstat:
Mtesting/web-platform/tests/css/css-overflow/line-clamp/block-ellipsis-029.html | 2+-
Mtesting/web-platform/tests/css/css-overflow/line-clamp/reference/block-ellipsis-029-ref.html | 2+-
Mtesting/web-platform/tests/css/css-overflow/line-clamp/reference/webkit-line-clamp-025-ref.html | 2+-
Mtesting/web-platform/tests/css/css-overflow/line-clamp/webkit-line-clamp-025.html | 2+-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/testing/web-platform/tests/css/css-overflow/line-clamp/block-ellipsis-029.html b/testing/web-platform/tests/css/css-overflow/line-clamp/block-ellipsis-029.html @@ -8,7 +8,7 @@ <style> div { line-clamp: 1; - width: 5ch; + width: 5.1ch; font-family: monospace; border: solid 1px; margin: 1em; diff --git a/testing/web-platform/tests/css/css-overflow/line-clamp/reference/block-ellipsis-029-ref.html b/testing/web-platform/tests/css/css-overflow/line-clamp/reference/block-ellipsis-029-ref.html @@ -4,7 +4,7 @@ <style> div { line-clamp: 1; - width: 5ch; + width: 5.1ch; font-family: monospace; border: solid 1px; margin: 1em; diff --git a/testing/web-platform/tests/css/css-overflow/line-clamp/reference/webkit-line-clamp-025-ref.html b/testing/web-platform/tests/css/css-overflow/line-clamp/reference/webkit-line-clamp-025-ref.html @@ -9,7 +9,7 @@ white-space: pre; padding: 0 4px; background-color: yellow; - width: 11ch; + width: 11.1ch; } .float { float: right; diff --git a/testing/web-platform/tests/css/css-overflow/line-clamp/webkit-line-clamp-025.html b/testing/web-platform/tests/css/css-overflow/line-clamp/webkit-line-clamp-025.html @@ -14,7 +14,7 @@ white-space: pre; padding: 0 4px; background-color: yellow; - width: 11ch; + width: 11.1ch; overflow: hidden; /* can be removed once implementations update their old -webkit-line-clamp implementations */ } .float {