[BlackBerry] Enable Custom Scheme Handlers for BlackBerry.
authorstaikos@webkit.org <staikos@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 16:00:22 +0000 (16:00 +0000)
committerstaikos@webkit.org <staikos@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 16:00:22 +0000 (16:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90422

Reviewed by Rob Buis.

.:

* Source/cmake/OptionsBlackBerry.cmake:

Source/WebCore:

* page/NavigatorRegisterProtocolHandler.cpp:
(WebCore::initProtocolHandlerWhitelist): Disable the overrides as
                                         they're undesired by BlackBerry

Source/WebKit/blackberry:

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore):
(WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
(WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):

Tools:

* Scripts/webkitperl/FeatureList.pm:

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

ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/page/NavigatorRegisterProtocolHandler.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.h
Source/cmake/OptionsBlackBerry.cmake
Tools/ChangeLog
Tools/Scripts/webkitperl/FeatureList.pm

index 47741e5..554d84c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2012-07-03  George Staikos  <staikos@webkit.org>
 
+        [BlackBerry] Enable Custom Scheme Handlers for BlackBerry.
+        https://bugs.webkit.org/show_bug.cgi?id=90422
+
+        Reviewed by Rob Buis.
+
+        * Source/cmake/OptionsBlackBerry.cmake:
+
+2012-07-03  George Staikos  <staikos@webkit.org>
+
         [BlackBerry] Enable RegisterProtocolHandler for BlackBerry.
         https://bugs.webkit.org/show_bug.cgi?id=90422
 
index 56481e9..47b6af0 100644 (file)
@@ -1,3 +1,14 @@
+2012-07-03  George Staikos  <staikos@webkit.org>
+
+        [BlackBerry] Enable Custom Scheme Handlers for BlackBerry.
+        https://bugs.webkit.org/show_bug.cgi?id=90422
+
+        Reviewed by Rob Buis.
+
+        * page/NavigatorRegisterProtocolHandler.cpp:
+        (WebCore::initProtocolHandlerWhitelist): Disable the overrides as
+                                                 they're undesired by BlackBerry
+
 2012-07-03  Eugene Klyuchnikov  <eustas.bug@gmail.com>
 
         Web Inspector: Forward message loop instrumentation data to frontend.
index dde5d79..0d5eb89 100644 (file)
@@ -46,6 +46,7 @@ static void initProtocolHandlerWhitelist()
 {
     protocolWhitelist = new HashSet<String>;
     static const char* protocols[] = {
+#if !PLATFORM(BLACKBERRY)
         "irc",
         "mailto",
         "mms",
@@ -56,6 +57,7 @@ static void initProtocolHandlerWhitelist()
         "tel",
         "urn",
         "webcal",
+#endif
     };
     for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i)
         protocolWhitelist->add(protocols[i]);
index f02b2eb..9a99c35 100644 (file)
@@ -1,5 +1,19 @@
 2012-07-03  George Staikos  <staikos@webkit.org>
 
+        [BlackBerry] Enable Custom Scheme Handlers for BlackBerry.
+        https://bugs.webkit.org/show_bug.cgi?id=90422
+
+        Reviewed by Rob Buis.
+
+        * WebCoreSupport/ChromeClientBlackBerry.cpp:
+        (WebCore):
+        (WebCore::ChromeClientBlackBerry::isProtocolHandlerRegistered):
+        (WebCore::ChromeClientBlackBerry::unregisterProtocolHandler):
+        * WebCoreSupport/ChromeClientBlackBerry.h:
+        (ChromeClientBlackBerry):
+
+2012-07-03  George Staikos  <staikos@webkit.org>
+
         [BlackBerry] Enable RegisterProtocolHandler for BlackBerry.
         https://bugs.webkit.org/show_bug.cgi?id=90422
 
index 924f757..685df5f 100644 (file)
@@ -809,6 +809,16 @@ PassOwnPtr<ColorChooser> ChromeClientBlackBerry::createColorChooser(ColorChooser
     return nullptr;
 }
 
+#if ENABLE(CUSTOM_SCHEME_HANDLER)
+CustomHandlersState ChromeClientBlackBerry::isProtocolHandlerRegistered(const String&, const String&, const String&)
+{
+    return CustomHandlersDeclined;
+}
+
+void ChromeClientBlackBerry::unregisterProtocolHandler(const String&, const String&, const String&)
+{
+}
+#endif
 
 #if ENABLE(REGISTER_PROTOCOL_HANDLER)
 void ChromeClientBlackBerry::registerProtocolHandler(const WTF::String&, const WTF::String&, const WTF::String&, const WTF::String&)
index a7ff88a..7df6efc 100644 (file)
@@ -159,6 +159,11 @@ public:
     virtual void registerProtocolHandler(const WTF::String&, const WTF::String&, const WTF::String&, const WTF::String&);
 #endif
 
+#if ENABLE(CUSTOM_SCHEME_HANDLER)
+    virtual CustomHandlersState isProtocolHandlerRegistered(const String&, const String&, const String&);
+    virtual void unregisterProtocolHandler(const String&, const String&, const String&);
+#endif
+
     BlackBerry::WebKit::WebPagePrivate* webPagePrivate() const { return m_webPagePrivate; }
 
 private:
index 61f10c1..f6316b2 100644 (file)
@@ -141,6 +141,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ANIMATION_API ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ASSEMBLER_WX_EXCLUSIVE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BATTERY_STATUS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BLOB ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CUSTOM_SCHEME_HANDLER ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DEVICE_ORIENTATION ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOWNLOAD_ATTRIBUTE ON)
index 7015ea0..110d4b0 100644 (file)
@@ -1,5 +1,14 @@
 2012-07-03  George Staikos  <staikos@webkit.org>
 
+        [BlackBerry] Enable Custom Scheme Handlers for BlackBerry.
+        https://bugs.webkit.org/show_bug.cgi?id=90422
+
+        Reviewed by Rob Buis.
+
+        * Scripts/webkitperl/FeatureList.pm:
+
+2012-07-03  George Staikos  <staikos@webkit.org>
+
         [BlackBerry] Enable RegisterProtocolHandler for BlackBerry.
         https://bugs.webkit.org/show_bug.cgi?id=90422
 
index 7d191f5..434d87a 100644 (file)
@@ -178,7 +178,7 @@ my @features = (
       define => "ENABLE_CSS_VARIABLES", default => 0, value => \$cssVariablesSupport },
 
     { option => "custom-scheme-handler", desc => "Toggle Custom Scheme Handler support",
-      define => "ENABLE_CUSTOM_SCHEME_HANDLER", default => 0, value => \$customSchemeHandlerSupport },
+      define => "ENABLE_CUSTOM_SCHEME_HANDLER", default => isBlackBerry(), value => \$customSchemeHandlerSupport },
 
     { option => "datalist", desc => "Toggle Datalist support",
       define => "ENABLE_DATALIST", default => isEfl(), value => \$datalistSupport },