Align Range.createContextualFragment() input validation with the specification
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Aug 2016 02:43:53 +0000 (02:43 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Aug 2016 02:43:53 +0000 (02:43 +0000)
commitcc132a1d647ec22541055aa3d88f8bf8600edc0a
tree2eccbb053f6bcfcf6278519a872b7519bc45ec0f
parent816225b72a82289635e69ddb6320fc2d2d7761b2
Align Range.createContextualFragment() input validation with the specification
https://bugs.webkit.org/show_bug.cgi?id=160634

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/domparsing/createContextualFragment-expected.txt:

Source/WebCore:

Align Range.createContextualFragment() input validation with the specification:
- https://w3c.github.io/DOM-Parsing/#idl-def-range-createcontextualfragment(domstring) (Step 2)

In particular, we were throwing a NOT_SUPPORTED_ERR when element had localname
"html" but was not in the HTML namespace. We should not throw in this case.

Firefox complies with the specification here.

No new tests, rebaselined existing test.

* dom/Range.cpp:
(WebCore::Range::createContextualFragment): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/domparsing/createContextualFragment-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Range.cpp
Source/WebCore/editing/markup.cpp
Source/WebCore/editing/markup.h
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLElement.h