[webkit-changes] [WebKit/WebKit] b2c286: Remove the isLoadingCustomFonts() check in FontCa...
Simon Fraser
noreply at github.com
Thu Jan 4 21:08:51 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b2c286c1a7c173f053bbca6fb2d53e1d5806e0a1
https://github.com/WebKit/WebKit/commit/b2c286c1a7c173f053bbca6fb2d53e1d5806e0a1
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2024-01-04 (Thu, 04 Jan 2024)
Changed paths:
M Source/WebCore/platform/graphics/FontCascade.cpp
Log Message:
-----------
Remove the isLoadingCustomFonts() check in FontCascade::operator==
https://bugs.webkit.org/show_bug.cgi?id=267083
<rdar://problem/120478069>
Reviewed by Cameron McCormack.
The first landing of custom font support (20474 at main) made it so that any FontCascade
comparison would return false if either side was loading custom fonts. But this makes
it impossible to use pointer equality in RenderStyle::diff() code, and could trigger
lots of extra layouts and painting while custom fonts are loading.
FontCascade::operator== already checks both `generation()` and `fontSelectorVersion()`
which increment as fonts load, so remove the isLoadingCustomFonts() check.
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::operator== const):
Canonical link: https://commits.webkit.org/272673@main
More information about the webkit-changes
mailing list