Move embed to the void element case in HTMLTreeBuilder#62067
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Apr 5, 2026
Merged
Move embed to the void element case in HTMLTreeBuilder#62067webkit-commit-queue merged 1 commit intoWebKit:mainfrom
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
Conversation
Collaborator
|
EWS run on current version of this PR (hash 30aa51f) Details |
30aa51f to
113cca0
Compare
https://bugs.webkit.org/show_bug.cgi?id=311510 Reviewed by Anne van Kesteren. The <embed> element was grouped with applet/marquee/object, which are non-void elements that push a marker onto the active formatting elements. Since <embed> is a void element, it was handled via a runtime tagName check that called insertSelfClosingHTMLElement instead, with redundant calls to reconstructTheActiveFormattingElements(). Per the WHATWG spec, <embed> belongs in the same case as area/br/img/keygen/wbr: https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody (see "A start tag whose tag name is one of: "area", "br", "embed", "img", "keygen", "wbr"") Move it there and simplify the applet/marquee/object case by removing the now-unnecessary if/else branch and redundant reconstruct calls. No behavior change — the previous code was correct but inefficient, as reconstructTheActiveFormattingElements() is idempotent. * Source/WebCore/html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processStartTagForInBody): Canonical link: https://commits.webkit.org/310605@main
113cca0 to
8d32cf1
Compare
Collaborator
|
Committed 310605@main (8d32cf1): https://commits.webkit.org/310605@main Reviewed commits have been landed. Closing PR #62067 and removing active labels. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
8d32cf1
30aa51f