Dragging a local .html into the current page doesn't show a "+" green circle nor does it allow dragging and dropping the site. This does work however when dragged and dropped to the toolbar. Repro steps: 1. Launch Safari on Windows 2. Drag and drop a local .html file into into current page. --Result: Local .html file is not displayed. Blue '+ Copy' displayed when hovering local .html file over current page instead of expected green '+'. --Note: Drag and drop of local .html files into bookmarks toolbar functions as expected. <rdar://problem/8514409>
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.
http://trac.webkit.org/changeset/84203