Skip to content

Fix conditional check for reaching maximum DOM tree depth - #47829

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
ruthvikkonda:fix-max-depth
Jul 11, 2025
Merged

webkit-commit-queue merged 1 commit into
WebKit:mainfrom
ruthvikkonda:fix-max-depth

Conversation

@ruthvikkonda

@ruthvikkonda ruthvikkonda commented Jul 10, 2025 •

Copy link
Copy Markdown
Contributor

6b7c4e6

Fix conditional check for reaching maximum DOM tree depth
https://bugs.webkit.org/show_bug.cgi?id=295696
rdar://155538446

Reviewed by Ryosuke Niwa.

Now we start adding as siblings right when we hit the max depth rather than waiting to go over the max.
>= is used to be robust and avoid off-by-one surprises.
Updated test to correctly check for sibling behavior exactly at max depth rather than max depth + 1.

* LayoutTests/fast/parser/block-nesting-cap-expected.txt:
* LayoutTests/fast/parser/block-nesting-cap.html:
* Source/WebCore/html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::attachLater):

Canonical link: https://commits.webkit.org/297241@main

957cf5c

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe   🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2   🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2   🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@ruthvikkonda ruthvikkonda self-assigned this Jul 10, 2025
@ruthvikkonda ruthvikkonda added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Jul 10, 2025
@ruthvikkonda
ruthvikkonda marked this pull request as ready for review July 10, 2025 18:07
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jul 10, 2025
@rniwa

rniwa commented Jul 10, 2025

Copy link
Copy Markdown
Member

We need to add a test for this. It looks like fast/parser/block-nesting-cap.html already tests this behavior so we just need to update that test.

@ruthvikkonda ruthvikkonda removed the merging-blocked Applied to prevent a change from being merged label Jul 10, 2025
@rniwa rniwa added the merge-queue Applied to send a pull request to merge-queue label Jul 11, 2025
https://bugs.webkit.org/show_bug.cgi?id=295696
rdar://155538446

Reviewed by Ryosuke Niwa.

Now we start adding as siblings right when we hit the max depth rather than waiting to go over the max.
>= is used to be robust and avoid off-by-one surprises.
Updated test to correctly check for sibling behavior exactly at max depth rather than max depth + 1.

* LayoutTests/fast/parser/block-nesting-cap-expected.txt:
* LayoutTests/fast/parser/block-nesting-cap.html:
* Source/WebCore/html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::attachLater):

Canonical link: https://commits.webkit.org/297241@main
@webkit-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 297241@main (6b7c4e6): https://commits.webkit.org/297241@main

Reviewed commits have been landed. Closing PR #47829 and removing active labels.

@webkit-commit-queue
webkit-commit-queue merged commit 6b7c4e6 into WebKit:main Jul 11, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Bugs Unclassified bugs are placed in this component until the correct component can be determined.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants