Skip to content
Permalink
Browse files
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.



Canonical link: https://commits.webkit.org/93037@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@104885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aproskuryakov committed Jan 13, 2012
1 parent 950d4f2 commit 675b778c1e41bdaa7a221a5f6ea0a2247d0cddd0
Showing 2 changed files with 12 additions and 14 deletions.
@@ -1,3 +1,12 @@
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 @@
}

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

0 comments on commit 675b778

Please sign in to comment.