createHTMLDocument() should not leave body in parsing state#66024
Merged
webkit-commit-queue merged 1 commit intoJun 1, 2026
Conversation
Collaborator
|
EWS run on previous version of this PR (hash cacee3d) Details |
cacee3d to
7cbd314
Compare
Collaborator
|
EWS run on current version of this PR (hash 7cbd314) Details
|
rniwa
approved these changes
Jun 1, 2026
https://bugs.webkit.org/show_bug.cgi?id=315847 Reviewed by Ryosuke Niwa. createHTMLDocument() used to populate the document with a write() call without a corresponding close() call. This meant that IsParsingChildren did not get unset, impacting :last-child and friends. A subtest of shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/test-009.html caught this. So we re-implement createHTMLDocument() the way the specification requires. This also impacts readyState (it's now "complete" instead of "loading") and we take this opportunity to upstream the local tests. Upstream: web-platform-tests/wpt#60293 Canonical link: https://commits.webkit.org/314295@main
7cbd314 to
dd8dcc1
Compare
Collaborator
|
Committed 314295@main (dd8dcc1): https://commits.webkit.org/314295@main Reviewed commits have been landed. Closing PR #66024 and removing active labels. |
beckysiegel
pushed a commit
to chromium/chromium
that referenced
this pull request
Jun 17, 2026
This is basically the same as WebKit/WebKit#66024 Imperatively building the document tree seems like a much better idea than using document.write Fixed: 522868200 Change-Id: Ie29f7b90717064409b17209b463da8f918e1e881 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7927670 Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: David Baron <dbaron@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#1648491}
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.
🛠 ios-apple
dd8dcc1
7cbd314
🧪 bindings