-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTML parser: execute self-closing SVG script element
https://bugs.webkit.org/show_bug.cgi?id=268168 Reviewed by Ryosuke Niwa and Chris Dumez. The code is largely structured like the HTML Standard, except we currently do not fake an end tag as needed for m_scriptToProcess to be properly assigned to. As foreign content supports self-closing start tags we also have to pretend the start tag is a non-self-closing one. This results in some slight code smell, but it seems acceptable enough. Gecko does this correctly already. Aligns WPT with this commit: web-platform-tests/wpt@eef173b * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/support/svg-script-self-closing.js: Added. * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/support/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/unclosed-svg-script-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/unclosed-svg-script.html: * Source/WebCore/html/parser/AtomHTMLToken.h: (WebCore::AtomHTMLToken::setSelfClosingToFalse): * Source/WebCore/html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processTokenInForeignContent): Canonical link: https://commits.webkit.org/273697@main
- Loading branch information
Showing
6 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...ts/imported/w3c/web-platform-tests/html/syntax/parsing/support/svg-script-self-closing.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scriptSelfClosing = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters