Bug 244822 - merge Element::attributeChanged and Element::parseAttribute and avoid base class calls when an attribute is handled
Summary: merge Element::attributeChanged and Element::parseAttribute and avoid base cl...
Status: RESOLVED DUPLICATE of bug 255258
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Cameron McCormack (:heycam)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-05 19:34 PDT by Cameron McCormack (:heycam)
Modified: 2023-07-25 06:50 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron McCormack (:heycam) 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.
Comment 1 Cameron McCormack (:heycam) 2022-09-05 19:40:15 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4040
Comment 2 Radar WebKit Bug Importer 2022-09-12 19:35:17 PDT
<rdar://problem/99850653>
Comment 3 Anne van Kesteren 2023-07-25 06:50:29 PDT

*** This bug has been marked as a duplicate of bug 255258 ***