Add 'isProtocolHandlerRegistered' and 'unregisterProtocolHandler'.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jun 2012 11:32:22 +0000 (11:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jun 2012 11:32:22 +0000 (11:32 +0000)
commit82c93fe6276ceffeaef227d97ac92faa8f3acca5
tree36c6c1561ff8ce39c140d4bd79d7ae5f3209c3bf
parentd5afda0252c9f384b613a5b7ec2d2757bd2c20a7
Add 'isProtocolHandlerRegistered' and 'unregisterProtocolHandler'.
https://bugs.webkit.org/show_bug.cgi?id=73176

Patch by Dongwoo Im <dw.im@samsung.com> on 2012-06-05
Reviewed by Adam Barth.

Two more APIs are added in Custom Scheme Handler specification.
http://dev.w3.org/html5/spec/Overview.html#custom-handlers
One is 'isProtocolHandlerRegistered' to query whether the specific URL
is registered or not.
The other is 'unregisterProtocolHandler' to remove the registered URL.

.:

* Source/cmake/WebKitFeatures.cmake: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.
* Source/cmakeconfig.h.cmake: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.

Source/WebCore:

Test: fast/dom/unregister-protocol-handler.html

* Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.
* loader/EmptyClients.h: Add prototypes.
(EmptyChromeClient):
(WebCore::EmptyChromeClient::isProtocolHandlerRegistered):
(WebCore::EmptyChromeClient::unregisterProtocolHandler):
* page/ChromeClient.h:
(ChromeClient):
* page/NavigatorRegisterProtocolHandler.cpp:
(WebCore):
(WebCore::customHandlersStateString):
(WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered): Query if the handler is registered.
(WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler): Unregister the registered handler.
* page/NavigatorRegisterProtocolHandler.h:
(NavigatorRegisterProtocolHandler):
* page/NavigatorRegisterProtocolHandler.idl:

Source/WebKit/chromium:

* features.gypi: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.

Source/WebKit/efl:

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::customHandlerDataCreate):
(WebCore::customHandlerDataDelete):
(WebCore::ChromeClientEfl::registerProtocolHandler):
(WebCore):
(WebCore::ChromeClientEfl::isProtocolHandlerRegistered): Query if the handler is registered.
(WebCore::ChromeClientEfl::unregisterProtocolHandler): Unregister the registered handler.
* WebCoreSupport/ChromeClientEfl.h:
(ChromeClientEfl):
* ewk/ewk_custom_handler.cpp:
(ewk_custom_handler_is_protocol_handler_registered): Query if the handler is registered.
(ewk_custom_handler_unregister_protocol_handler): Unregister the registered handler.
* ewk/ewk_custom_handler_private.h: Adds private function.
* ewk/ewk_view.h: Adds enumeration.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.

Tools:

* Scripts/webkitperl/FeatureList.pm: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.vsprops: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.
* win/tools/vsprops/FeatureDefinesCairo.vsprops: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.

LayoutTests:

* fast/dom/unregister-protocol-handler-expected.txt: Added.
* fast/dom/unregister-protocol-handler.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/dom/unregister-protocol-handler-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/unregister-protocol-handler.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/NavigatorRegisterProtocolHandler.cpp
Source/WebCore/page/NavigatorRegisterProtocolHandler.h
Source/WebCore/page/NavigatorRegisterProtocolHandler.idl
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/features.gypi
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
Source/WebKit/efl/ewk/ewk_custom_handler.cpp
Source/WebKit/efl/ewk/ewk_custom_handler_private.h
Source/WebKit/efl/ewk/ewk_view.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig
Source/cmake/WebKitFeatures.cmake
Source/cmakeconfig.h.cmake
Tools/ChangeLog
Tools/Scripts/webkitperl/FeatureList.pm
WebKitLibraries/ChangeLog
WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops
WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops