Add support for DOMTokenList.supports()
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Sep 2016 23:49:50 +0000 (23:49 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Sep 2016 23:49:50 +0000 (23:49 +0000)
commit2cfb7a42965a2b69a2cb0dabc89aa2d9f258416d
tree9827c5f8c9dcc196649c8953a97f0caeba8e350f
parent83022e4582cceef3f2aa18a5d5e4962c74a655a2
Add support for DOMTokenList.supports()
https://bugs.webkit.org/show_bug.cgi?id=162659

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C tests now that more checks are passing.

* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-link-element/link-rellist-expected.txt:

Source/WebCore:

Add support for DOMTokenList.supports():
- https://dom.spec.whatwg.org/#dom-domtokenlist-supports

Firefox and Chrome already recently implemented it (Chrome since
version 50 and Firefox since version 49).

Test: fast/dom/DOMTokenList-supports.html

* dom/SecurityContext.cpp:
(WebCore::SecurityContext::isSupportedSandboxPolicy):
(WebCore::SecurityContext::enforceSandboxFlags): Deleted.
* dom/SecurityContext.h:
* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::DOMTokenList):
(WebCore::DOMTokenList::supports):
(WebCore::DOMTokenList::replace): Deleted.
* html/DOMTokenList.h:
(WebCore::DOMTokenList::DOMTokenList):
* html/DOMTokenList.idl:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
(WebCore::HTMLAnchorElement::relList):
* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::sandbox):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::relList):
* html/HTMLTableCellElement.idl:
* html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::isSupported):
(WebCore::LinkRelAttribute::LinkRelAttribute): Deleted.
* html/LinkRelAttribute.h:

LayoutTests:

Add layout test coverage. Our pass rate is identical to Firefox 49,
everything passes except HTMLElement.dropzone. Chrome 53's pass rate
is lower because relList is not a DOMTokenList on anchor / area,
they do not support HTMLElement.dropzone and their
DOMTokenList.supports() is case-sensitive.

* fast/dom/DOMTokenList-supports-expected.txt: Added.
* fast/dom/DOMTokenList-supports.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@206561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/DOMTokenList-supports-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/DOMTokenList-supports.html [new file with mode: 0644]
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-rellist-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/SecurityContext.cpp
Source/WebCore/dom/SecurityContext.h
Source/WebCore/html/DOMTokenList.cpp
Source/WebCore/html/DOMTokenList.h
Source/WebCore/html/DOMTokenList.idl
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLAnchorElement.idl
Source/WebCore/html/HTMLAreaElement.idl
Source/WebCore/html/HTMLIFrameElement.cpp
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/HTMLTableCellElement.idl
Source/WebCore/html/LinkRelAttribute.cpp
Source/WebCore/html/LinkRelAttribute.h