Closed Bug 2095268 Opened 10 days ago Closed 8 days ago

[wpt-sync] Sync PR 65070 - [css-fonts] Preserve optional font display state

Categories

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

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Hoch Hochkeppel <mhochk@microsoft.com> wrote:

[css-fonts] Preserve optional font display state

Stylesheet insertion may trigger a rebuild of the font cache, which
effectively resets the state of all the font-faces (even those not
otherwise impacted). This is often fine, but means that an optional
font-face that was previously skipped might get suddenly used, even
though the spec [1] says

once the text has been painted to the screen with a fallback font
instead, it must not be rendered with the optional font for the rest of
the page’s lifetime

This change updates the cache rebuild to reuse un-impacted
stylesheet/RuleSet pairs, retaining their state and avoiding this
problem.

[1] https://drafts.csswg.org/css-fonts-4/#valdef-font-face-font-display-optional

Fixed: 583911891
Change-Id: I7f023256f4b4f875f36dc907a1d98a293792d7ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8788043
Reviewed-by: Kevin Babbitt \<kbabbitt@microsoft.com>
Commit-Queue: Hoch Hochkeppel \<mhochk@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1742519}

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

CI Results

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

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS : 1

Chrome

OK : 1
FAIL : 1

Safari

TIMEOUT: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.