Bug 245939 - [web-animations] avoid extra serialization and parsing when calling commitStyles()
Summary: [web-animations] avoid extra serialization and parsing when calling commitSty...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-02 00:12 PDT by Antoine Quint
Modified: 2022-10-09 00:13 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2022-10-02 00:12:40 PDT
Currently WebAnimation::commitStyles() is rather inefficient as it sets new inline styles on a CSSStyleDeclaration as text, which requires serialization from the CSSValue and then parsing, and finally serializes the whole declaration before having it re-parsed once more when we call setAttribute("style", …). We should find a way to just pass around the CSSValue into the underlying data structures throughout.
Comment 1 Antoine Quint 2022-10-02 00:18:48 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4910
Comment 2 Radar WebKit Bug Importer 2022-10-09 00:13:19 PDT
<rdar://problem/100943337>