Title: [105077] trunk/Source/WebKit/mac
Revision
105077
Author
[email protected]
Date
2012-01-16 10:46:52 -0800 (Mon, 16 Jan 2012)

Log Message

        A warning is logged to console when typing a bare "/" in Safari address bar
        https://bugs.webkit.org/show_bug.cgi?id=76236

        Reviewed by John Sullivan.

        * Misc/WebNSURLExtras.mm: (+[NSURL _web_URLWithData:relativeToURL:]): Bail out early for paths.

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (105076 => 105077)


--- trunk/Source/WebKit/mac/ChangeLog	2012-01-16 18:42:03 UTC (rev 105076)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-01-16 18:46:52 UTC (rev 105077)
@@ -1,3 +1,12 @@
+2012-01-12  Alexey Proskuryakov  <[email protected]>
+
+        A warning is logged to console when typing a bare "/" in Safari address bar
+        https://bugs.webkit.org/show_bug.cgi?id=76236
+
+        Reviewed by John Sullivan.
+
+        * Misc/WebNSURLExtras.mm: (+[NSURL _web_URLWithData:relativeToURL:]): Bail out early for paths.
+
 2012-01-16  Pablo Flouret  <[email protected]>
 
         Fix compilation errors on build-webkit --debug --no-svg --no-svg-fonts --no-svg-dom-objc-bindings on mac.

Modified: trunk/Source/WebKit/mac/Misc/WebNSURLExtras.mm (105076 => 105077)


--- trunk/Source/WebKit/mac/Misc/WebNSURLExtras.mm	2012-01-16 18:42:03 UTC (rev 105076)
+++ trunk/Source/WebKit/mac/Misc/WebNSURLExtras.mm	2012-01-16 18:46:52 UTC (rev 105077)
@@ -434,6 +434,11 @@
         baseURL = [baseURL _webkit_URLByRemovingResourceSpecifier];
         
         const UInt8 *bytes = static_cast<const UInt8*>([data bytes]);
+
+        // CFURLCreateAbsoluteURLWithBytes would complain to console if we passed a path to it.
+        if (bytes[0] == '/')
+            return nil;
+
         // NOTE: We use UTF-8 here since this encoding is used when computing strings when returning URL components
         // (e.g calls to NSURL -path). However, this function is not tolerant of illegal UTF-8 sequences, which
         // could either be a malformed string or bytes in a different encoding, like shift-jis, so we fall back
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to