Commit 78530e7a authored by ap@apple.com's avatar ap@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.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 37374ece
2012-01-12 Alexey Proskuryakov <ap@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 <andersca@apple.com>
Create a GraphicsLayer for the overhang areas if threaded scrolling is enabled
......@@ -42,22 +42,11 @@ KURL::KURL(NSURL *url)
}
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment