Update scheme list according to latest specification
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2013 07:11:35 +0000 (07:11 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2013 07:11:35 +0000 (07:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=119510

Reviewed by Christophe Dumez.

New schemes are added to it additionally. Those are bitcoin, im, ircs and wtai.
As additional work, scheme order is listed to be sync with spec.

Spec: http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers

Source/WebCore:

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

* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::initProtocolHandlerWhitelist):

LayoutTests:

* fast/dom/register-protocol-handler-expected.txt:
* fast/dom/register-protocol-handler.html:
* fast/dom/unregister-protocol-handler-expected.txt:
* fast/dom/unregister-protocol-handler.html:
* platform/efl/fast/dom/register-protocol-handler-expected.txt:
* platform/efl/fast/dom/unregister-protocol-handler-expected.txt:

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

LayoutTests/ChangeLog
LayoutTests/fast/dom/register-protocol-handler-expected.txt
LayoutTests/fast/dom/register-protocol-handler.html
LayoutTests/fast/dom/unregister-protocol-handler-expected.txt
LayoutTests/fast/dom/unregister-protocol-handler.html
LayoutTests/platform/efl/fast/dom/register-protocol-handler-expected.txt
LayoutTests/platform/efl/fast/dom/unregister-protocol-handler-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp

index f98b387..3260812 100644 (file)
@@ -1,3 +1,22 @@
+2013-08-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Update scheme list according to latest specification
+        https://bugs.webkit.org/show_bug.cgi?id=119510
+
+        Reviewed by Christophe Dumez.
+
+        New schemes are added to it additionally. Those are bitcoin, im, ircs and wtai.
+        As additional work, scheme order is listed to be sync with spec.
+
+        Spec: http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
+
+        * fast/dom/register-protocol-handler-expected.txt:
+        * fast/dom/register-protocol-handler.html:
+        * fast/dom/unregister-protocol-handler-expected.txt:
+        * fast/dom/unregister-protocol-handler.html:
+        * platform/efl/fast/dom/register-protocol-handler-expected.txt:
+        * platform/efl/fast/dom/unregister-protocol-handler-expected.txt:
+
 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
 
         Fix null dereference in HTMLAnchorElement::sendPings when frame is not attached to a page
 2013-08-12  Ryosuke Niwa  <rniwa@webkit.org>
 
         Fix null dereference in HTMLAnchorElement::sendPings when frame is not attached to a page
index 6290003..616f648 100644 (file)
@@ -4,10 +4,13 @@ Fail: window.navigator.registerProtocolHandler is not defined.
 Fail: Invalid protocol "http" allowed.
 Fail: Invalid protocol "https" allowed.
 Fail: Invalid protocol "file" allowed.
 Fail: Invalid protocol "http" allowed.
 Fail: Invalid protocol "https" allowed.
 Fail: Invalid protocol "file" allowed.
-Fail: Valid protocol "irc" failed.
+Fail: Valid protocol "bitcoin" failed.
 Fail: Valid protocol "geo" failed.
 Fail: Valid protocol "geo" failed.
-Fail: Valid protocol "mailto" failed.
+Fail: Valid protocol "im" failed.
+Fail: Valid protocol "irc" failed.
+Fail: Valid protocol "ircs" failed.
 Fail: Valid protocol "magnet" failed.
 Fail: Valid protocol "magnet" failed.
+Fail: Valid protocol "mailto" failed.
 Fail: Valid protocol "mms" failed.
 Fail: Valid protocol "news" failed.
 Fail: Valid protocol "nntp" failed.
 Fail: Valid protocol "mms" failed.
 Fail: Valid protocol "news" failed.
 Fail: Valid protocol "nntp" failed.
@@ -18,6 +21,7 @@ Fail: Valid protocol "ssh" failed.
 Fail: Valid protocol "tel" failed.
 Fail: Valid protocol "urn" failed.
 Fail: Valid protocol "webcal" failed.
 Fail: Valid protocol "tel" failed.
 Fail: Valid protocol "urn" failed.
 Fail: Valid protocol "webcal" failed.
+Fail: Valid protocol "wtai" failed.
 Fail: Valid protocol "xmpp" failed.
 Fail: Invalid url "" allowed.
 Fail: Invalid url "%S" allowed.
 Fail: Valid protocol "xmpp" failed.
 Fail: Invalid url "" allowed.
 Fail: Invalid url "%S" allowed.
index 3692d86..ffa64f9 100644 (file)
@@ -32,7 +32,7 @@ invalid_protocols.forEach(function (protocol) {
         debug('Fail: Invalid protocol "' + protocol + '" allowed.');
 });
 
         debug('Fail: Invalid protocol "' + protocol + '" allowed.');
 });
 
-var valid_protocols = ['irc', 'geo', 'mailto', 'magnet', 'mms', 'news', 'nntp', 'sip', 'sms', 'smsto', 'ssh', 'tel', 'urn', 'webcal', 'xmpp'];
+var valid_protocols = ['bitcoin', 'geo', 'im', 'irc', 'ircs', 'magnet', 'mailto', 'mms', 'news', 'nntp', 'sip', 'sms', 'smsto', 'ssh', 'tel', 'urn', 'webcal', 'wtai', 'xmpp'];
 valid_protocols.forEach(function (protocol) {
     var succeeded = false;
     try {
 valid_protocols.forEach(function (protocol) {
     var succeeded = false;
     try {
index 3ce32f4..ee49fff 100644 (file)
@@ -4,10 +4,13 @@ Fail: window.navigator.unregisterProtocolHandler is not defined.
 Fail: Invalid protocol "http" allowed.
 Fail: Invalid protocol "https" allowed.
 Fail: Invalid protocol "file" allowed.
 Fail: Invalid protocol "http" allowed.
 Fail: Invalid protocol "https" allowed.
 Fail: Invalid protocol "file" allowed.
-Fail: Valid protocol "irc" failed.
+Fail: Valid protocol "bitcoin" failed.
 Fail: Valid protocol "geo" failed.
 Fail: Valid protocol "geo" failed.
-Fail: Valid protocol "mailto" failed.
+Fail: Valid protocol "im" failed.
+Fail: Valid protocol "irc" failed.
+Fail: Valid protocol "ircs" failed.
 Fail: Valid protocol "magnet" failed.
 Fail: Valid protocol "magnet" failed.
+Fail: Valid protocol "mailto" failed.
 Fail: Valid protocol "mms" failed.
 Fail: Valid protocol "news" failed.
 Fail: Valid protocol "nntp" failed.
 Fail: Valid protocol "mms" failed.
 Fail: Valid protocol "news" failed.
 Fail: Valid protocol "nntp" failed.
@@ -18,6 +21,7 @@ Fail: Valid protocol "ssh" failed.
 Fail: Valid protocol "tel" failed.
 Fail: Valid protocol "urn" failed.
 Fail: Valid protocol "webcal" failed.
 Fail: Valid protocol "tel" failed.
 Fail: Valid protocol "urn" failed.
 Fail: Valid protocol "webcal" failed.
+Fail: Valid protocol "wtai" failed.
 Fail: Valid protocol "xmpp" failed.
 Fail: Invalid url "" allowed.
 Fail: Invalid url "%S" allowed.
 Fail: Valid protocol "xmpp" failed.
 Fail: Invalid url "" allowed.
 Fail: Invalid url "%S" allowed.
index 3f680c4..24a8565 100644 (file)
@@ -32,7 +32,7 @@ invalid_protocols.forEach(function (protocol) {
         debug('Fail: Invalid protocol "' + protocol + '" allowed.');
 });
 
         debug('Fail: Invalid protocol "' + protocol + '" allowed.');
 });
 
-var valid_protocols = ['irc', 'geo', 'mailto', 'magnet', 'mms', 'news', 'nntp', 'sip', 'sms', 'smsto', 'ssh', 'tel', 'urn', 'webcal', 'xmpp'];
+var valid_protocols = ['bitcoin', 'geo', 'im', 'irc', 'ircs', 'magnet', 'mailto', 'mms', 'news', 'nntp', 'sip', 'sms', 'smsto', 'ssh', 'tel', 'urn', 'webcal', 'wtai', 'xmpp'];
 valid_protocols.forEach(function (protocol) {
     var succeeded = false;
     try {
 valid_protocols.forEach(function (protocol) {
     var succeeded = false;
     try {
index 861282f..75a78d7 100644 (file)
@@ -4,10 +4,13 @@ Pass: window.navigator.registerProtocolHandler is defined.
 Pass: Invalid protocol "http" threw SecurityError exception.
 Pass: Invalid protocol "https" threw SecurityError exception.
 Pass: Invalid protocol "file" threw SecurityError exception.
 Pass: Invalid protocol "http" threw SecurityError exception.
 Pass: Invalid protocol "https" threw SecurityError exception.
 Pass: Invalid protocol "file" threw SecurityError exception.
-Pass: Valid protocol "irc" allowed.
+Pass: Valid protocol "bitcoin" allowed.
 Pass: Valid protocol "geo" allowed.
 Pass: Valid protocol "geo" allowed.
-Pass: Valid protocol "mailto" allowed.
+Pass: Valid protocol "im" allowed.
+Pass: Valid protocol "irc" allowed.
+Pass: Valid protocol "ircs" allowed.
 Pass: Valid protocol "magnet" allowed.
 Pass: Valid protocol "magnet" allowed.
+Pass: Valid protocol "mailto" allowed.
 Pass: Valid protocol "mms" allowed.
 Pass: Valid protocol "news" allowed.
 Pass: Valid protocol "nntp" allowed.
 Pass: Valid protocol "mms" allowed.
 Pass: Valid protocol "news" allowed.
 Pass: Valid protocol "nntp" allowed.
@@ -18,6 +21,7 @@ Pass: Valid protocol "ssh" allowed.
 Pass: Valid protocol "tel" allowed.
 Pass: Valid protocol "urn" allowed.
 Pass: Valid protocol "webcal" allowed.
 Pass: Valid protocol "tel" allowed.
 Pass: Valid protocol "urn" allowed.
 Pass: Valid protocol "webcal" allowed.
+Pass: Valid protocol "wtai" allowed.
 Pass: Valid protocol "xmpp" allowed.
 Pass: Invalid url "" threw SyntaxError exception.
 Pass: Invalid url "%S" threw SyntaxError exception.
 Pass: Valid protocol "xmpp" allowed.
 Pass: Invalid url "" threw SyntaxError exception.
 Pass: Invalid url "%S" threw SyntaxError exception.
index 38b528e..1f0f306 100644 (file)
@@ -4,10 +4,13 @@ Pass: window.navigator.unregisterProtocolHandler is defined.
 Pass: Invalid protocol "http" threw SecurityError exception.
 Pass: Invalid protocol "https" threw SecurityError exception.
 Pass: Invalid protocol "file" threw SecurityError exception.
 Pass: Invalid protocol "http" threw SecurityError exception.
 Pass: Invalid protocol "https" threw SecurityError exception.
 Pass: Invalid protocol "file" threw SecurityError exception.
-Pass: Valid protocol "irc" allowed.
+Pass: Valid protocol "bitcoin" allowed.
 Pass: Valid protocol "geo" allowed.
 Pass: Valid protocol "geo" allowed.
-Pass: Valid protocol "mailto" allowed.
+Pass: Valid protocol "im" allowed.
+Pass: Valid protocol "irc" allowed.
+Pass: Valid protocol "ircs" allowed.
 Pass: Valid protocol "magnet" allowed.
 Pass: Valid protocol "magnet" allowed.
+Pass: Valid protocol "mailto" allowed.
 Pass: Valid protocol "mms" allowed.
 Pass: Valid protocol "news" allowed.
 Pass: Valid protocol "nntp" allowed.
 Pass: Valid protocol "mms" allowed.
 Pass: Valid protocol "news" allowed.
 Pass: Valid protocol "nntp" allowed.
@@ -18,6 +21,7 @@ Pass: Valid protocol "ssh" allowed.
 Pass: Valid protocol "tel" allowed.
 Pass: Valid protocol "urn" allowed.
 Pass: Valid protocol "webcal" allowed.
 Pass: Valid protocol "tel" allowed.
 Pass: Valid protocol "urn" allowed.
 Pass: Valid protocol "webcal" allowed.
+Pass: Valid protocol "wtai" allowed.
 Pass: Valid protocol "xmpp" allowed.
 Pass: Invalid url "" threw SyntaxError exception.
 Pass: Invalid url "%S" threw SyntaxError exception.
 Pass: Valid protocol "xmpp" allowed.
 Pass: Invalid url "" threw SyntaxError exception.
 Pass: Invalid url "%S" threw SyntaxError exception.
index 017010a..ae05509 100644 (file)
@@ -1,3 +1,21 @@
+2013-08-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Update scheme list according to latest specification
+        https://bugs.webkit.org/show_bug.cgi?id=119510
+
+        Reviewed by Christophe Dumez.
+
+        New schemes are added to it additionally. Those are bitcoin, im, ircs and wtai.
+        As additional work, scheme order is listed to be sync with spec.
+
+        Spec: http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
+
+        Test: fast/dom/register-protocol-handler.html
+              fast/dom/unregister-protocol-handler.html
+
+        * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
+        (WebCore::initProtocolHandlerWhitelist):
+
 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
 
         Yet another Windows build fix attempt after r153978.
 2013-08-13  Ryosuke Niwa  <rniwa@webkit.org>
 
         Yet another Windows build fix attempt after r153978.
index bd80772..5753433 100644 (file)
@@ -45,10 +45,13 @@ static void initProtocolHandlerWhitelist()
     protocolWhitelist = new HashSet<String>;
 #if !PLATFORM(BLACKBERRY)
     static const char* protocols[] = {
     protocolWhitelist = new HashSet<String>;
 #if !PLATFORM(BLACKBERRY)
     static const char* protocols[] = {
-        "irc",
+        "bitcoin",
         "geo",
         "geo",
-        "mailto",
+        "im",
+        "irc",
+        "ircs",
         "magnet",
         "magnet",
+        "mailto",
         "mms",
         "news",
         "nntp",
         "mms",
         "news",
         "nntp",
@@ -59,7 +62,8 @@ static void initProtocolHandlerWhitelist()
         "tel",
         "urn",
         "webcal",
         "tel",
         "urn",
         "webcal",
-        "xmpp"
+        "wtai",
+        "xmpp",
     };
     for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i)
         protocolWhitelist->add(protocols[i]);
     };
     for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i)
         protocolWhitelist->add(protocols[i]);