Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A clonable shadow tree is cloned in its entirety #1272

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Apr 3, 2024

Tests: web-platform-tests/wpt#44247.

Fixes #1249.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

@annevk annevk requested a review from mfreed7 April 3, 2024 13:59
@annevk
Copy link
Member Author

annevk commented Apr 3, 2024

cc @emilio

@annevk annevk added the topic: shadow Relates to shadow trees (as defined in DOM) label Apr 3, 2024
Copy link
Contributor

@mfreed7 mfreed7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for fixing this.

@annevk annevk merged commit 3de55b3 into main Apr 4, 2024
2 checks passed
@annevk annevk deleted the annevk/clonenode branch April 4, 2024 07:27
webkit-commit-queue pushed a commit to annevk/WebKit that referenced this pull request Apr 4, 2024
https://bugs.webkit.org/show_bug.cgi?id=272089

Reviewed by Ryosuke Niwa.

This aligns us with other browsers and this change to the DOM standard:
whatwg/dom#1272

* LayoutTests/imported/w3c/web-platform-tests/shadow-dom/shadow-root-clonable-expected.txt:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::cloneNodeInternal): This is the change that makes the test pass.
* Source/WebCore/dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::cloneNodeInternal): This cleans up a conditional that is always true.

Canonical link: https://commits.webkit.org/277066@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: shadow Relates to shadow trees (as defined in DOM)
Development

Successfully merging this pull request may close these issues.

How should clonable work in cloneNode(false)?
2 participants