[Webkit-unassigned] [Bug 244822] New: merge Element::attributeChanged and Element::parseAttribute and avoid base class calls when an attribute is handled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 5 19:34:41 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=244822

            Bug ID: 244822
           Summary: merge Element::attributeChanged and
                    Element::parseAttribute and avoid base class calls
                    when an attribute is handled
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: heycam at apple.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220906/77c24899/attachment.htm>


More information about the webkit-unassigned mailing list