Title: [113285] trunk/Source/WebCore
Revision
113285
Author
[email protected]
Date
2012-04-04 21:06:30 -0700 (Wed, 04 Apr 2012)

Log Message

[BlackBerry] Add local: protocol support in KURL for blackberry
https://bugs.webkit.org/show_bug.cgi?id=82695

Reviewed by Rob Buis.

BlackBerry porting is using local: protocol just as file: protocol
with the exception that it sandboxes the path to the application private space.

* platform/KURL.cpp:
(WebCore::KURL::parse):
(WebCore::portAllowed):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (113284 => 113285)


--- trunk/Source/WebCore/ChangeLog	2012-04-05 03:44:19 UTC (rev 113284)
+++ trunk/Source/WebCore/ChangeLog	2012-04-05 04:06:30 UTC (rev 113285)
@@ -1,3 +1,17 @@
+2012-04-04  Leo Yang  <[email protected]>
+
+        [BlackBerry] Add local: protocol support in KURL for blackberry
+        https://bugs.webkit.org/show_bug.cgi?id=82695
+
+        Reviewed by Rob Buis.
+
+        BlackBerry porting is using local: protocol just as file: protocol
+        with the exception that it sandboxes the path to the application private space.
+
+        * platform/KURL.cpp:
+        (WebCore::KURL::parse):
+        (WebCore::portAllowed):
+
 2012-04-04  Simon Fraser  <[email protected]>
 
         https://bugs.webkit.org/show_bug.cgi?id=82994

Modified: trunk/Source/WebCore/platform/KURL.cpp (113284 => 113285)


--- trunk/Source/WebCore/platform/KURL.cpp	2012-04-05 03:44:19 UTC (rev 113284)
+++ trunk/Source/WebCore/platform/KURL.cpp	2012-04-05 04:06:30 UTC (rev 113285)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -1107,6 +1108,17 @@
         && isLetterMatchIgnoringCase(url[2], 'l')
         && isLetterMatchIgnoringCase(url[3], 'e');
 
+#if PLATFORM(BLACKBERRY)
+    // Parse local: urls the same as file: urls.
+    if (!isFile)
+        isFile = schemeEnd == 5
+            && isLetterMatchIgnoringCase(url[0], 'l')
+            && isLetterMatchIgnoringCase(url[1], 'o')
+            && isLetterMatchIgnoringCase(url[2], 'c')
+            && isLetterMatchIgnoringCase(url[3], 'a')
+            && isLetterMatchIgnoringCase(url[4], 'l');
+#endif
+
     m_protocolIsInHTTPFamily = isLetterMatchIgnoringCase(url[0], 'h')
         && isLetterMatchIgnoringCase(url[1], 't')
         && isLetterMatchIgnoringCase(url[2], 't')
@@ -1871,6 +1883,11 @@
     if (url.protocolIs("file"))
         return true;
 
+#if PLATFORM(BLACKBERRY)
+    if (url.protocolIs("local"))
+        return true;
+#endif
+
     return false;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to