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

Revert "Trusted Types integration for "converting nodes into a node"" #1299

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

lukewarlow
Copy link
Member

@lukewarlow lukewarlow commented Jul 22, 2024

This reverts commit 720a4fc.

These changes aren't needed given the current protection model used for script elements. See w3c/trusted-types#537

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


Preview | Diff

This reverts commit 720a4fc.

These changes aren't needed given the current protection model used for script elements.
lukewarlow added a commit to lukewarlow/WebKit that referenced this pull request Jul 22, 2024
https://bugs.webkit.org/show_bug.cgi?id=276881

Reviewed by NOBODY (OOPS!).

The enforcement of Trusted Types in various node manipulation APIs in DOM
was based on a previous model for protecting script elements.

This patch removes it as its not needed.

See whatwg/dom#1299 and w3c/trusted-types#537

* LayoutTests/imported/w3c/web-platform-tests/trusted-types/Node-multiple-arguments-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/trusted-types/Node-multiple-arguments-tt-enforced-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/trusted-types/Node-multiple-arguments-tt-enforced.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/trusted-types/block-Node-multiple-arguments.html.
* Source/WebCore/dom/ChildNode.idl:
* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::append):
(WebCore::ContainerNode::prepend):
(WebCore::ContainerNode::replaceChildren):
* Source/WebCore/dom/ContainerNode.h:
* Source/WebCore/dom/Node.cpp:
(WebCore::nodeSetPreTransformedFromNodeOrStringVector):
(WebCore::Node::convertNodesOrStringsIntoNode):
(WebCore::Node::convertNodesOrStringsIntoNodeVector):
(WebCore::Node::before):
(WebCore::Node::after):
(WebCore::Node::replaceWith):
(WebCore::nodeSetPreTransformedFromNodeOrStringOrTrustedScriptVector): Deleted.
(WebCore::Node::convertNodesOrStringsOrTrustedScriptsIntoNode): Deleted.
(WebCore::Node::convertNodesOrStringsOrTrustedScriptsIntoNodeVector): Deleted.
* Source/WebCore/dom/Node.h:
* Source/WebCore/dom/ParentNode.idl:
* Source/WebCore/dom/TrustedType.cpp:
(WebCore::processNodeOrStringAsTrustedType): Deleted.
* Source/WebCore/dom/TrustedType.h:
webkit-commit-queue pushed a commit to lukewarlow/WebKit that referenced this pull request Jul 24, 2024
https://bugs.webkit.org/show_bug.cgi?id=276881

Reviewed by Ryosuke Niwa.

The enforcement of Trusted Types in various node manipulation APIs in DOM
was based on a previous model for protecting script elements.

This patch removes it as its not needed.

See whatwg/dom#1299 and w3c/trusted-types#537

* LayoutTests/imported/w3c/web-platform-tests/trusted-types/Node-multiple-arguments-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/trusted-types/Node-multiple-arguments-tt-enforced-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/trusted-types/Node-multiple-arguments-tt-enforced.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/trusted-types/block-Node-multiple-arguments.html.
* Source/WebCore/dom/ChildNode.idl:
* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::append):
(WebCore::ContainerNode::prepend):
(WebCore::ContainerNode::replaceChildren):
* Source/WebCore/dom/ContainerNode.h:
* Source/WebCore/dom/Node.cpp:
(WebCore::nodeSetPreTransformedFromNodeOrStringVector):
(WebCore::Node::convertNodesOrStringsIntoNode):
(WebCore::Node::convertNodesOrStringsIntoNodeVector):
(WebCore::Node::before):
(WebCore::Node::after):
(WebCore::Node::replaceWith):
(WebCore::nodeSetPreTransformedFromNodeOrStringOrTrustedScriptVector): Deleted.
(WebCore::Node::convertNodesOrStringsOrTrustedScriptsIntoNode): Deleted.
(WebCore::Node::convertNodesOrStringsOrTrustedScriptsIntoNodeVector): Deleted.
* Source/WebCore/dom/Node.h:
* Source/WebCore/dom/ParentNode.idl:
* Source/WebCore/dom/TrustedType.cpp:
(WebCore::processNodeOrStringAsTrustedType): Deleted.
* Source/WebCore/dom/TrustedType.h:

Canonical link: https://commits.webkit.org/281285@main
@annevk annevk merged commit 809bfa2 into whatwg:main Aug 13, 2024
2 checks passed
@lukewarlow lukewarlow deleted the revert-tt-dom-node branch August 13, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants