Add Element.matches, the standard name for webkitMatchesSelector
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Apr 2014 22:25:42 +0000 (22:25 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Apr 2014 22:25:42 +0000 (22:25 +0000)
commita87e88a28154b5f7d104501daa473dea732b0284
treea0382fccfcecd45ff5cb41d35ecb4839ddb94e31
parent5874ed289660a92f39eeb3848a9bea54b0d29ff6
Add Element.matches, the standard name for webkitMatchesSelector
https://bugs.webkit.org/show_bug.cgi?id=131922

Reviewed by Andreas Kling.

Source/WebCore:
This patch just renames webkitMatchesSelector() to matches().

* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
The Objective-C binding generator only supported ImplementedAs for getters and setters.
This adds support for the option so that Element.matches can be generated for Obj-C.

* dom/Element.cpp:
(WebCore::Element::matches):
(WebCore::Element::webkitMatchesSelector): Deleted.
* dom/Element.h:
* dom/Element.idl:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):

LayoutTests:
Update the tests to verify both Element.matches and Element.webkitMatchesSelector

* fast/dom/SelectorAPI/attrname-case-insensitive-expected.txt:
* fast/dom/SelectorAPI/attrname-case-insensitive.html:
* fast/dom/SelectorAPI/attrname-case-sensitive-expected.txt:
* fast/dom/SelectorAPI/attrname-case-sensitive.xhtml:
* fast/dom/SelectorAPI/caseID-almost-strict-expected.txt:
* fast/dom/SelectorAPI/caseID-almost-strict.html:
* fast/dom/SelectorAPI/caseID-expected.txt:
* fast/dom/SelectorAPI/caseID-strict-expected.txt:
* fast/dom/SelectorAPI/caseID-strict.html:
* fast/dom/SelectorAPI/caseID.html:
* fast/dom/SelectorAPI/caseTag-expected.txt:
* fast/dom/SelectorAPI/caseTag.html:
* fast/dom/SelectorAPI/caseTagX-expected.txt:
* fast/dom/SelectorAPI/caseTagX.xhtml:
* fast/dom/SelectorAPI/detached-element-expected.txt:
* fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt:
* fast/dom/SelectorAPI/not-supported-namespace-in-selector.html:
* fast/dom/SelectorAPI/script-tests/detached-element.js:
* fast/dom/SelectorAPI/script-tests/undefined-null-stringify.js:
* fast/dom/SelectorAPI/script-tests/viewless-document.js:
* fast/dom/SelectorAPI/undefined-null-stringify-expected.txt:
* fast/dom/SelectorAPI/viewless-document-expected.txt:
* fast/forms/radio/radio-live-validation-style-expected.txt:
* fast/forms/radio/radio-live-validation-style.html:
* fast/harness/results.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/SelectorAPI/attrname-case-insensitive-expected.txt
LayoutTests/fast/dom/SelectorAPI/attrname-case-insensitive.html
LayoutTests/fast/dom/SelectorAPI/attrname-case-sensitive-expected.txt
LayoutTests/fast/dom/SelectorAPI/attrname-case-sensitive.xhtml
LayoutTests/fast/dom/SelectorAPI/caseID-almost-strict-expected.txt
LayoutTests/fast/dom/SelectorAPI/caseID-almost-strict.html
LayoutTests/fast/dom/SelectorAPI/caseID-expected.txt
LayoutTests/fast/dom/SelectorAPI/caseID-strict-expected.txt
LayoutTests/fast/dom/SelectorAPI/caseID-strict.html
LayoutTests/fast/dom/SelectorAPI/caseID.html
LayoutTests/fast/dom/SelectorAPI/caseTag-expected.txt
LayoutTests/fast/dom/SelectorAPI/caseTag.html
LayoutTests/fast/dom/SelectorAPI/caseTagX-expected.txt
LayoutTests/fast/dom/SelectorAPI/caseTagX.xhtml
LayoutTests/fast/dom/SelectorAPI/detached-element-expected.txt
LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt
LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector.html
LayoutTests/fast/dom/SelectorAPI/script-tests/detached-element.js
LayoutTests/fast/dom/SelectorAPI/script-tests/undefined-null-stringify.js
LayoutTests/fast/dom/SelectorAPI/script-tests/viewless-document.js
LayoutTests/fast/dom/SelectorAPI/undefined-null-stringify-expected.txt
LayoutTests/fast/dom/SelectorAPI/viewless-document-expected.txt
LayoutTests/fast/forms/radio/radio-live-validation-style-expected.txt
LayoutTests/fast/forms/radio/radio-live-validation-style.html
LayoutTests/fast/harness/results.html
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Element.idl
Source/WebCore/inspector/InspectorCSSAgent.cpp