Title: [104885] trunk/Source/WebCore
- Revision
- 104885
- Author
- a...@apple.com
- Date
- 2012-01-12 17:27:28 -0800 (Thu, 12 Jan 2012)
Log Message
NSURL to KURL conversion shouldn't turn raw paths into file URLs
https://bugs.webkit.org/show_bug.cgi?id=76234
Reviewed by Darin Adler.
* platform/mac/KURLMac.mm: (WebCore::KURL::KURL): Removed this code.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (104884 => 104885)
--- trunk/Source/WebCore/ChangeLog 2012-01-13 01:16:40 UTC (rev 104884)
+++ trunk/Source/WebCore/ChangeLog 2012-01-13 01:27:28 UTC (rev 104885)
@@ -1,3 +1,12 @@
+2012-01-12 Alexey Proskuryakov <a...@apple.com>
+
+ NSURL to KURL conversion shouldn't turn raw paths into file URLs
+ https://bugs.webkit.org/show_bug.cgi?id=76234
+
+ Reviewed by Darin Adler.
+
+ * platform/mac/KURLMac.mm: (WebCore::KURL::KURL): Removed this code.
+
2012-01-12 Anders Carlsson <ander...@apple.com>
Create a GraphicsLayer for the overhang areas if threaded scrolling is enabled
Modified: trunk/Source/WebCore/platform/mac/KURLMac.mm (104884 => 104885)
--- trunk/Source/WebCore/platform/mac/KURLMac.mm 2012-01-13 01:16:40 UTC (rev 104884)
+++ trunk/Source/WebCore/platform/mac/KURLMac.mm 2012-01-13 01:27:28 UTC (rev 104885)
@@ -42,22 +42,11 @@
}
CFIndex bytesLength = CFURLGetBytes(reinterpret_cast<CFURLRef>(url), 0, 0);
- Vector<char, 512> buffer(bytesLength + 6); // 5 for "file:", 1 for null character to end C string
- char* bytes = &buffer[5];
+ Vector<char, 512> buffer(bytesLength + 1);
+ char* bytes = &buffer[0];
CFURLGetBytes(reinterpret_cast<CFURLRef>(url), reinterpret_cast<UInt8*>(bytes), bytesLength);
bytes[bytesLength] = '\0';
- if (bytes[0] != '/') {
- parse(bytes);
- return;
- }
-
- buffer[0] = 'f';
- buffer[1] = 'i';
- buffer[2] = 'l';
- buffer[3] = 'e';
- buffer[4] = ':';
-
- parse(buffer.data());
+ parse(bytes);
}
KURL::operator NSURL *() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes