WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 58842
Dropping a file in a WKView (WebKit2) doesn't load the file
https://bugs.webkit.org/show_bug.cgi?id=58842
Summary
Dropping a file in a WKView (WebKit2) doesn't load the file
Enrica Casucci
Reported
2011-04-18 15:30:16 PDT
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
>
Attachments
Patch
(1.75 KB, patch)
2011-04-18 15:39 PDT
,
Enrica Casucci
mjs
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Enrica Casucci
Comment 1
2011-04-18 15:39:50 PDT
Created
attachment 90104
[details]
Patch
Jeff Miller
Comment 2
2011-04-18 15:49:49 PDT
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());
Jeff Miller
Comment 3
2011-04-18 15:56:33 PDT
(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.
Maciej Stachowiak
Comment 4
2011-04-18 15:57:02 PDT
Comment on
attachment 90104
[details]
Patch r=me but please consider Jeff's suggestion when landing.
Enrica Casucci
Comment 5
2011-04-18 16:06:46 PDT
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.
Enrica Casucci
Comment 6
2011-04-18 16:09:44 PDT
http://trac.webkit.org/changeset/84203
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug