Commit a1f51510 authored by enrica@apple.com's avatar enrica@apple.com

Dropping a file in a WKView (WebKit2) doesn't load the file.

https://bugs.webkit.org/show_bug.cgi?id=58842
<rdar://problem/8514409>
        
Reviewed by Maciej Stachowiak.

The URL string for the file contains an extra %00 at the end
that causes the network framework to fail to load the file.
        
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::getURL):



git-svn-id: svn://svn.chromium.org/blink/trunk@84203 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7441f86c
2011-04-18 Enrica Casucci <enrica@apple.com>
Reviewed by Maciej Stachowiak.
Dropping a file in a WKView (WebKit2) doesn't load the file.
https://bugs.webkit.org/show_bug.cgi?id=58842
<rdar://problem/8514409>
The URL string for the file contains an extra %00 at the end
that causes the network framework to fail to load the file.
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::getURL):
2011-04-18 Geoffrey Garen <ggaren@apple.com> 2011-04-18 Geoffrey Garen <ggaren@apple.com>
Discovered and rubber-stamped by Stephanie Lewis. Discovered and rubber-stamped by Stephanie Lewis.
...@@ -444,7 +444,7 @@ String getURL(const DragDataMap* data, DragData::FilenameConversionPolicy filena ...@@ -444,7 +444,7 @@ String getURL(const DragDataMap* data, DragData::FilenameConversionPolicy filena
if (stringData.isEmpty() || (!PathFileExists(stringData.charactersWithNullTermination()) && !PathIsUNC(stringData.charactersWithNullTermination()))) if (stringData.isEmpty() || (!PathFileExists(stringData.charactersWithNullTermination()) && !PathIsUNC(stringData.charactersWithNullTermination())))
return url; return url;
RetainPtr<CFStringRef> pathAsCFString(AdoptCF, CFStringCreateWithCharacters(kCFAllocatorDefault, (const UniChar *)stringData.charactersWithNullTermination(), stringData.length())); RetainPtr<CFStringRef> pathAsCFString(AdoptCF, CFStringCreateWithCharacters(kCFAllocatorDefault, (const UniChar *)stringData.charactersWithNullTermination(), wcslen(stringData.charactersWithNullTermination())));
if (urlFromPath(pathAsCFString.get(), url) && title) if (urlFromPath(pathAsCFString.get(), url) && title)
*title = url; *title = url;
#endif #endif
......
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