Closed Bug 1728846 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 30310 - Do not access a null optional for text-decorations

Categories

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

task

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Stephen Chenney <schenney@chromium.org>' wrote:

Do not access a null optional for text-decorations

The TextDecorationInfo::ComputeDecorationThickness method
assumed that the font always had a non-null UnderlineThickness.
But a zero sized font has a nullopt for UnderlineThickness and
we would crash when trying to get the thickness for decorations.

Refactor the code to check for null thickness data.

Add a WPT test.

Bug: 1244319
Change-Id: Ibc7dc1a9869e982d8398f9d3f7a20d447040a5b5
Reviewed-on: https://chromium-review.googlesource.com/3138622
WPT-Export-Revision: e3762c2a4b191eacaf6c252ef0776625bd197816

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests

Status Summary

Firefox

PASS : 1

Chrome

CRASH: 1

Safari

PASS : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b5ecc1c77c75
[wpt PR 30310] - Do not access a null optional for text-decorations, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.