Bug 242565

Summary: make FontCascade refcounted to make style diffing cheaper when only color has changed
Product: WebKit Reporter: Cameron McCormack (:heycam) <heycam>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Cameron McCormack (:heycam) 2022-07-09 23:09:06 PDT
When the color property is being animated, an element will get a new StyleInheritedData, since that's where color lives.  The FontCasca object, which is moderately large, will be copied.  We can end up spending significant time under FontCascad::operator== under RenderStyle::changeRequiresLayout and RenderText::styleDidChange, comparing identical FontCascad objects.

Turning StyleInheritedData::fontCascade into a DataRef<FontCascade> would make comparison cheap when font style data is not changing.
Comment 1 Radar WebKit Bug Importer 2022-07-09 23:09:16 PDT
<rdar://problem/96788373>