Remove additional elements from the active formatting elements list#58508
Merged
chromium-wpt-export-bot merged 1 commit intomasterfrom Mar 15, 2026
Merged
Remove additional elements from the active formatting elements list#58508chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-wpt-export-bot merged 1 commit intomasterfrom
Conversation
Our current implementation of the adoption algorithm [1] misses one of the step defined in the specification: > 13.4- If innerLoopCounter is greater than 3 and node is in the list of active formatting elements, then remove node from the list of active formatting elements. This causes that some extra reconstruction is done, causing different DOM trees than the ones Firefox and Safari builds in some malformed HTML content. Some of the failures in the removed from the expected.txt files are examples of these interop issues in the DOM reconstruction provided by the adoption algorithm. I have defined an unit tests with one of these examples, because I think it's easier to understand and debug these cases. [1] html.spec.whatwg.org/multipage/parsing.html#adoption-agency-algorithm Bug: 4077595 Change-Id: I92a79e68c21f85a52822a57deccbb48ae21afc52 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7535115 Reviewed-by: Mason Freed <masonf@chromium.org> Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/main@{#1599642}
8e57873 to
9357c89
Compare
wpt-pr-bot
approved these changes
Mar 15, 2026
Collaborator
wpt-pr-bot
left a comment
There was a problem hiding this comment.
The review process for this patch is being conducted in the Chromium project.
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.
Our current implementation of the adoption algorithm [1] misses one of
the step defined in the specification:
This causes that some extra reconstruction is done, causing different
DOM trees than the ones Firefox and Safari builds in some malformed HTML
content.
Some of the failures in the removed from the expected.txt files are
examples of these interop issues in the DOM reconstruction provided by
the adoption algorithm. I have defined an unit tests with one of these
examples, because I think it's easier to understand and debug these
cases.
[1]
html.spec.whatwg.org/multipage/parsing.html#adoption-agency-algorithm
Bug: 4077595
Change-Id: I92a79e68c21f85a52822a57deccbb48ae21afc52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7535115
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Javier Fernandez <jfernandez@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1599642}