-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update implementation of TT enforcement for document.write(ln)
https://bugs.webkit.org/show_bug.cgi?id=273819 Reviewed by Ryosuke Niwa. This patch switches document.write and writeln to use a union IDL type and single call to default policy. This brings it close to chromium behaviour. See whatwg/html#10328 * LayoutTests/imported/w3c/web-platform-tests/trusted-types/Document-write-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/trusted-types/Document-write.html: * LayoutTests/imported/w3c/web-platform-tests/trusted-types/block-string-assignment-to-Document-write-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.html: * Source/WebCore/dom/Document+HTML.idl: * Source/WebCore/dom/Document.cpp: (WebCore::Document::write): (WebCore::Document::writeln): * Source/WebCore/dom/Document.h: Canonical link: https://commits.webkit.org/278501@main
- Loading branch information
1 parent
e3736ef
commit e84b70e
Showing
7 changed files
with
229 additions
and
13 deletions.
There are no files selected for viewing
9 changes: 8 additions & 1 deletion
9
LayoutTests/imported/w3c/web-platform-tests/trusted-types/Document-write-expected.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
Quack, I want to be a duck! | ||
abcdefghijkl | ||
|
||
PASS document.write with html assigned via policy (successful transformation). | ||
PASS document.writeln with html assigned via policy (successful transformation). | ||
PASS document.write(TrustedHTML, TrustedHTML) | ||
PASS document.writeln(TrustedHTML, TrustedHTML) | ||
PASS document.write(TrustedHTML, String) | ||
PASS document.writeln(TrustedHTML, String) | ||
PASS document.write(String, String) | ||
PASS document.writeln(String, String) | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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