[webkit-changes] [WebKit/WebKit] 55036f: Add support for duplicate attributes to the HTML f...
Chris Dumez
noreply at github.com
Wed Apr 19 09:19:41 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 55036f71e77686c94215a6963d5e36576faa59ee
https://github.com/WebKit/WebKit/commit/55036f71e77686c94215a6963d5e36576faa59ee
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-04-19 (Wed, 19 Apr 2023)
Changed paths:
M Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp
Log Message:
-----------
Add support for duplicate attributes to the HTML fast parser
https://bugs.webkit.org/show_bug.cgi?id=255618
Reviewed by Darin Adler.
The HTML fast parser already had logic to detect duplicate attributes, so it
was already doing most the work. However, when finding a duplicate, it would
just abort and let the full HTML parser deal with the input string. It is not
much more work to properly support duplicate attributes and it doesn't slow
down the parser on Speedometer. As a result, I think we should add the
functionality.
Note that I am still using a Vector to store the attribute names. Switching to
a HashSet regresses Speedometer. I am however keeping the Vector sorted to
speed up detection of duplicates.
* Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp:
(WebCore::insertInUniquedSortedVector):
(WebCore::HTMLFastPathParser::parseAttributes):
Canonical link: https://commits.webkit.org/263136@main
More information about the webkit-changes
mailing list