Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Drop [UsePointersEvenForNonNullableObjectArguments] from Document
https://bugs.webkit.org/show_bug.cgi?id=156881 Reviewed by Darin Adler. LayoutTests/imported/w3c: Rebaseline now that more checks are passing. * web-platform-tests/dom/interfaces-expected.txt: * web-platform-tests/html/dom/interfaces-expected.txt: Source/WebCore: Drop [UsePointersEvenForNonNullableObjectArguments] from Document. There is no major Web-exposed behavior change but the type of the exception being thrown when passing null or not enough parameters has changed for some of the API (It is now always a TypeError as per the Web IDL specification). Tests: fast/dom/Document/adoptNode-null.html fast/dom/Document/importNode-null.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::takeAllChildrenFrom): (WebCore::ContainerNode::parserInsertBefore): (WebCore::ContainerNode::parserAppendChild): * dom/Document.cpp: (WebCore::Document::importNode): (WebCore::Document::adoptNode): (WebCore::Document::createNodeIterator): (WebCore::Document::createTreeWalker): (WebCore::Document::setBodyOrFrameset): (WebCore::Document::hasValidNamespaceForElements): Deleted. (WebCore::Document::scheduleForcedStyleRecalc): Deleted. (WebCore::Document::scheduleStyleRecalc): Deleted. (WebCore::Document::unscheduleStyleRecalc): Deleted. (WebCore::Document::hasPendingStyleRecalc): Deleted. (WebCore::Document::hasPendingForcedStyleRecalc): Deleted. (WebCore::Document::recalcStyle): Deleted. (WebCore::Document::explicitClose): Deleted. * dom/Document.h: (WebCore::Document::importNode): * dom/Document.idl: * dom/NodeIterator.cpp: (WebCore::NodeIterator::NodeIterator): * dom/NodeIterator.h: (WebCore::NodeIterator::create): LayoutTests: Add test cases for cases where the type of the exception being thrown has changed. * fast/dom/Document/adoptNode-null-expected.txt: Added. * fast/dom/Document/adoptNode-null.html: Added. * fast/dom/Document/importNode-null-expected.txt: Added. * fast/dom/Document/importNode-null.html: Added. * fast/dom/importNode-null-expected.txt: Removed. * fast/dom/importNode-null.html: Removed. Canonical link: https://commits.webkit.org/175001@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
190 additions
and 184 deletions.
- +17 −0 LayoutTests/ChangeLog
- +11 −0 LayoutTests/fast/dom/Document/adoptNode-null-expected.txt
- +13 −0 LayoutTests/fast/dom/Document/adoptNode-null.html
- +11 −0 LayoutTests/fast/dom/Document/importNode-null-expected.txt
- +13 −0 LayoutTests/fast/dom/Document/importNode-null.html
- +0 −4 LayoutTests/fast/dom/importNode-null-expected.txt
- +0 −35 LayoutTests/fast/dom/importNode-null.html
- +12 −0 LayoutTests/imported/w3c/ChangeLog
- +4 −8 LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt
- +4 −12 LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
- +4 −12 LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
- +42 −0 Source/WebCore/ChangeLog
- +3 −3 Source/WebCore/dom/ContainerNode.cpp
- +19 −67 Source/WebCore/dom/Document.cpp
- +7 −11 Source/WebCore/dom/Document.h
- +26 −28 Source/WebCore/dom/Document.idl
- +2 −2 Source/WebCore/dom/NodeIterator.cpp
- +2 −2 Source/WebCore/dom/NodeIterator.h
There are no files selected for viewing
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
@@ -0,0 +1,11 @@ | ||
Tests that document.adoptNode(null) throws a TypeError | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS document.adoptNode(null) threw exception TypeError: Type error. | ||
PASS document.adoptNode() threw exception TypeError: Not enough arguments. | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
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
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<script src="../../../resources/js-test-pre.js"></script> | ||
<script> | ||
description("Tests that document.adoptNode(null) throws a TypeError"); | ||
|
||
shouldThrow("document.adoptNode(null)", "'TypeError: Type error'"); | ||
shouldThrow("document.adoptNode()", "'TypeError: Not enough arguments'"); | ||
</script> | ||
<script src="../../../resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
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
@@ -0,0 +1,11 @@ | ||
Tests that document.importNode(null) throws a TypeError | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS document.importNode(null) threw exception TypeError: Type error. | ||
PASS document.importNode() threw exception TypeError: Not enough arguments. | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
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
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<script src="../../../resources/js-test-pre.js"></script> | ||
<script> | ||
description("Tests that document.importNode(null) throws a TypeError"); | ||
|
||
shouldThrow("document.importNode(null)", "'TypeError: Type error'"); | ||
shouldThrow("document.importNode()", "'TypeError: Not enough arguments'"); | ||
</script> | ||
<script src="../../../resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
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
Oops, something went wrong.