Closed Bug 1769623 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 34079 - Fixed text-decoration-thickness rendering

Categories

(Core :: Layout: Text and Fonts, task, P4)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 34079 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/34079
Details from upstream follow.

Traian Captan <tcaptan@chromium.org> wrote:

Fixed text-decoration-thickness rendering

CSS text-decoration-thickness renders 1px thinner compared to other
browsers (Firefox, Safari),
when the calculated thickness has a decimal part >= .5px,
because the value gets floored by
GraphicsContext::DrawLineForText via RoundDownThickness.

The other engines seem to round to the nearest integer when
text-decoration-thickness value is not auto.

The proposed fix is to match the other engines by rounding the
text-decoration-thickness value when it is not auto.
The rounding is done in ComputeDecorationThickness to avoid also
rounding when text-decoration-thickness value is set to auto.

Tentative WPT tests are added to reflect the rounding behavior.

R=dbaron, futhark, pdr, schenney

Change-Id: Ie26664884d2cc48d2b7ffd838a21d0b771303718
Bug: 1255280

Reviewed-on: https://chromium-review.googlesource.com/3639882
WPT-Export-Revision: d484f9688dee955f365272493712fe2539c06f29

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a3d53e87bfca
[wpt PR 34079] - Fixed text-decoration-thickness rendering, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.