Bug 244822

Summary: merge Element::attributeChanged and Element::parseAttribute and avoid base class calls when an attribute is handled
Product: WebKit Reporter: Cameron McCormack (:heycam) <heycam>
Component: DOMAssignee: Cameron McCormack (:heycam) <heycam>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: annevk, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Cameron McCormack (:heycam)
Reported 2022-09-05 19:34:41 PDT
I can't see a good reason to have separate Element::attributeChanged and Element::parseAttribute member functions. The patch in this bug will do two things: 1. Merge parseAttribute into attributeChanged, to avoid one virtual function call. 2. Tweak the contents of attributeChanged functions to consistently avoid calling the base class attributeChanged if an attribute is handled in the derived class. As well as reducing the amount of work done when an attribute is changed, very slightly, this sets the stage for a subsequent patch to use an enum value to represent known attribute names instead of checking for QualifiedName equality.
Attachments
Cameron McCormack (:heycam)
Comment 1 2022-09-05 19:40:15 PDT
Radar WebKit Bug Importer
Comment 2 2022-09-12 19:35:17 PDT
Anne van Kesteren
Comment 3 2023-07-25 06:50:29 PDT
*** This bug has been marked as a duplicate of bug 255258 ***
Note You need to log in before you can comment on or make changes to this bug.