Bug
1612231 [wpt PR 21507] - Partial style recalc after font loading, a=testonly
Automatic update from web-platform-tests
Partial style recalc after font loading
This patch reduces style recalc after loading a web font, by:
1. Allowing 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/c/chromium/src/+/
1952189
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738710}
--
wpt-commits:
3f8358844a35a0e066d5a406e77a1669f8682d8a
wpt-pr: 21507