Summary: | Dropping a file in a WKView (WebKit2) doesn't load the file | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Enrica Casucci <enrica> | ||||
Component: | WebKit2 | Assignee: | Enrica Casucci <enrica> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | jeffm | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | Windows 7 | ||||||
Attachments: |
|
Description
Enrica Casucci
2011-04-18 15:30:16 PDT
Created attachment 90104 [details]
Patch
Comment on attachment 90104 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=90104&action=review > Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp:447 > + RetainPtr<CFStringRef> pathAsCFString(AdoptCF, CFStringCreateWithCharacters(kCFAllocatorDefault, (const UniChar *)stringData.charactersWithNullTermination(), wcslen(stringData.charactersWithNullTermination()))); Can't you just do: RetainPtr<CFStringRef> pathAsCFString(AdoptCF, stringData.createCFString()); (In reply to comment #2) > (From update of attachment 90104 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=90104&action=review > > > Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp:447 > > + RetainPtr<CFStringRef> pathAsCFString(AdoptCF, CFStringCreateWithCharacters(kCFAllocatorDefault, (const UniChar *)stringData.charactersWithNullTermination(), wcslen(stringData.charactersWithNullTermination()))); > > Can't you just do: RetainPtr<CFStringRef> pathAsCFString(AdoptCF, stringData.createCFString()); Ignore that comment, I see that the problem you're addressing is that there is an extra null at the end, and createCFString() is using String::length(), which would be wrong. Comment on attachment 90104 [details]
Patch
r=me but please consider Jeff's suggestion when landing.
In his last comment, Jeff told me to ignore his previous comment. In fact what I'm removing is the use of String.length() to get rid of the extra 0 at the end. Thanks for the review. |