Bug 244020 - use enum values for tag and element names
Summary: use enum values for tag and element names
Status: RESOLVED FIXED
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-08-16 23:56 PDT by Cameron McCormack (:heycam)
Modified: 2022-08-31 13:24 PDT (History)
1 user (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-08-16 23:56:08 PDT
We currently generate the WebCore::findHTMLTag function and use this in the AtomHTMLToken constructor.  We can extend this to look for any known tag name (HTML, SVG, or MathML) by reworking make-names.pl a bit.

This isn't helpful for Speedometer performance, since parsing non-HTML tags is rare, but local testing shows it to be a neutral change.  Handling all known tag names will set the stage for a later patch that does improve Speedometer performance.
Comment 1 Radar WebKit Bug Importer 2022-08-16 23:56:24 PDT
<rdar://problem/98767683>
Comment 2 Cameron McCormack (:heycam) 2022-08-17 00:14:14 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3395
Comment 3 Cameron McCormack (:heycam) 2022-08-25 22:41:53 PDT
Broadening the scope of this bug to introduce enums for known tag names, element names, and namespaces, and to use the enums in the HTML parser instead of checking for QualifiedName equality in many places.

Local testing shows this could be a ~1% improvement on Speedometer 2.1.
Comment 4 Cameron McCormack (:heycam) 2022-08-25 22:46:38 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3689
Comment 5 EWS 2022-08-31 13:23:59 PDT
Committed 254007@main (321c28bff9f2): <https://commits.webkit.org/254007@main>

Reviewed commits have been landed. Closing PR #3689 and removing active labels.