Closed Bug 1612231 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 21507 - Partial style recalc after font loading

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

Partial style recalc after font loading

This is an all-in-one prototype to reduce style recalc after loading a
web font. This patch:

  1. Allows a Font object to be reused after loading a web font, by
    calling FontFallbackList::Invalidate() when accessing a FontFallbackList
    after font updates.

  2. On the style and layout update after font loading:

    a. Traverses the document, and invalidates styles on nodes where
    font metrics are required for style computation: when length
    units 'ch' and 'ex' are used, or when 'font-size-adjust'
    property is set.

    b. Stops using IsLoadingCustomFont() related checks for style or
    layout invalidation.

    c. Traverses the layout tree to manually invalidate layout, since
    font changes are no longer reflected in ComputedStyle differences.

Bug: 441925
Change-Id: I932b733e71a6de936f95bdff435ce177997820ff
Reviewed-on: https://chromium-review.googlesource.com/1952189
WPT-Export-Revision: 2124e2d600bbff43e4e04f4d54b865064bb4e58f

Component: web-platform-tests → CSS Parsing and Computation
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 3 subtests

Status Summary

Firefox

OK : 1
PASS: 3

Chrome

OK : 1
FAIL: 3

Safari

OK : 1
FAIL: 3

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fffd5a11683d [wpt PR 21507] - Partial style recalc after font loading, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.