Element.matches()'s argument is not supposed to be optional
https://bugs.webkit.org/show_bug.cgi?id=137427

Reviewed by Christophe Dumez.

Source/WebCore:

The argument was marked as optional, it is not supposed to:
https://dom.spec.whatwg.org/#interface-element

Also update the webkit-prefixed version: webkitMatchesSelector().

Tests: fast/dom/SelectorAPI/closest-definition.html
       fast/dom/SelectorAPI/closest-null-undefined.html
       fast/dom/SelectorAPI/matches-definition.html
       fast/dom/SelectorAPI/matches-null-undefined.html

* dom/Element.idl:

LayoutTests:

* fast/dom/SelectorAPI/matches-definition.html: Added.
* fast/dom/SelectorAPI/matches-null-undefined.html: Added.
Test for the bug.

* fast/dom/SelectorAPI/closest-definition.html: Added.
* fast/dom/SelectorAPI/closest-null-undefined.html: Added.
Similar tests for Element.closest() since those are similar APIs.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Introduce EWebKit_Extension
https://bugs.webkit.org/show_bug.cgi?id=134921

Reviewed by Gyuyoung Kim.

Source/WebKit2:

EWebKit2 does not provide the functionality to extend WebProcess.
Although there is ewk_context_new_with_injected_bundle_path() in ewebkit2 APIs,
application developers can not make bundle object without touching WK APIs
which ewebkit2 does not expose.

This patch introduces EWebKit_Extension, basic structure for the extension of WebProcess.

* PlatformEfl.cmake:
Added files for the EWebKit_Extension and install them properly.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(bundlePathForExtension):
(EwkContext::create):
(EwkContext::getInjectedBundleInitializationUserData):
(EwkContext::setMessageFromInjectedBundleCallback):
(ewk_context_new_with_extensions_path):
Deleted because ewebkit2 does not have a way to make injected bundle.
Instead, Ewk_Extension will cover the same functionalities.
(ewk_context_new_with_injected_bundle_path): Deleted.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
(EwkContext::extensionsPath):
* UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
(EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample):
(EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample): Renamed injectedBundleSample to extensionSample.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp: Copied from Source/WebKit2/UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp.
* UIProcess/API/efl/tests/test_ewk2_context.cpp: Renamed ewk_context_new_with_injected_bundle_path to ewk_context_new_with_extensions_path.
(TEST_F):
* WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Added.
(EwkExtension::append):
(EwkExtension::remove):
(ewk_extension_client_add):
(ewk_extension_client_del):
* WebProcess/InjectedBundle/API/efl/ewk_extension.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Added.
(EwkExtension::EwkExtension):
(EwkExtension::~EwkExtension):
* WebProcess/efl/ExtensionManagerEfl.cpp: Added.
(WebKit::ExtensionManagerEfl::shared):
(WebKit::ExtensionManagerEfl::ExtensionManagerEfl):
(WebKit::ExtensionManagerEfl::initialize):
* WebProcess/efl/ExtensionManagerEfl.h: Added.
* WebProcess/efl/WebInjectedBundleMainEfl.cpp: Added.
(WKBundleInitialize):
* efl/ewebkit2-extension.pc.in: Added.

Tools:

* MiniBrowser/efl/main.c: Added x option to test extension path.
(window_create):
(elm_main):
* Scripts/webkitpy/common/config/watchlist:
Added Source/WebKit2/WebProcess/InjectedBundle/API/efl/ into EFLWebKit2PublicAPI.
* Scripts/webkitpy/style/checker.py:
Added Source/WebKit2/WebProcess/InjectedBundle/API/efl/ into EFL exceptions.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a deprecation warning for Element.webkitMatchesSelector
https://bugs.webkit.org/show_bug.cgi?id=137417

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-05
Reviewed by Christophe Dumez.

Source/WebCore:

Many scripts have assumed that the unprefixed version of ElementwebkitMatchesSelector
would be Element.matchesSelector. Feature detection scripts too often test
for Element.matchesSelector instead of Element.matches before calling Element.webkitMatchesSelector.

This patch add a deprecation warning for Element.webkitMatchesSelector with the hope
that it will push the adoption of the unprefixed version.

* dom/Element.cpp:
(WebCore::Element::webkitMatchesSelector):
* dom/Element.h:
* dom/Element.idl:

LayoutTests:

* jquery/resources/src/sizzle/sizzle.js:
This is a great example of library that needs fixing. The old sizzle
we have in WebKit used "matchesSelector" instead of "matches".

* fast/dom/SelectorAPI/attrname-case-insensitive-expected.txt:
* fast/dom/SelectorAPI/attrname-case-sensitive-expected.txt:
* fast/dom/SelectorAPI/caseID-almost-strict-expected.txt:
* fast/dom/SelectorAPI/caseID-expected.txt:
* fast/dom/SelectorAPI/caseID-strict-expected.txt:
* fast/dom/SelectorAPI/caseTag-expected.txt:
* fast/dom/SelectorAPI/caseTagX-expected.txt:
* fast/dom/SelectorAPI/detached-element-expected.txt:
* fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt:
* fast/dom/SelectorAPI/undefined-null-stringify-expected.txt:
Update the test results due to the warning.

* fast/forms/radio/radio-live-validation-style-expected.txt:
* fast/forms/radio/radio-live-validation-style.html:
That duplicate I added back when I unprefixed Element.matches() is useless.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174336 268f45cc-cd09-0410-ab3c-d52691b4dbfc