WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
60991
WebKit2: Needs API to set a custom drop target
https://bugs.webkit.org/show_bug.cgi?id=60991
Summary
WebKit2: Needs API to set a custom drop target
Brian Weinstein
Reported
2011-05-17 14:47:25 PDT
WebKit2 needs an API to set a custom drop target for a view. It exists in WebKit1. <
rdar://problem/9090868
>
Attachments
[PATCH] Fix
(3.15 KB, patch)
2011-05-17 14:54 PDT
,
Brian Weinstein
aroben
: review-
Details
Formatted Diff
Diff
[PATCH] Fix v2
(3.23 KB, patch)
2011-05-17 15:21 PDT
,
Brian Weinstein
aroben
: review-
Details
Formatted Diff
Diff
[PATCH] Fix v3
(3.29 KB, patch)
2011-05-17 15:30 PDT
,
Brian Weinstein
aroben
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Brian Weinstein
Comment 1
2011-05-17 14:54:41 PDT
Created
attachment 93821
[details]
[PATCH] Fix
Adam Roben (:aroben)
Comment 2
2011-05-17 14:56:07 PDT
Comment on
attachment 93821
[details]
[PATCH] Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=93821&action=review
> Source/WebKit2/UIProcess/win/WebView.cpp:1128 > +void WebView::setCustomDropTarget(IDropTarget* dropTarget) > +{ > + ::RevokeDragDrop(m_window); > + ::RegisterDragDrop(m_window, dropTarget); > +}
If someone passes in 0 here, we should set the drop target back to our standard one. Otherwise clients will have no way to clear their custom drop target.
Brian Weinstein
Comment 3
2011-05-17 14:58:49 PDT
(In reply to
comment #2
)
> (From update of
attachment 93821
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=93821&action=review
> > > Source/WebKit2/UIProcess/win/WebView.cpp:1128 > > +void WebView::setCustomDropTarget(IDropTarget* dropTarget) > > +{ > > + ::RevokeDragDrop(m_window); > > + ::RegisterDragDrop(m_window, dropTarget); > > +} > > If someone passes in 0 here, we should set the drop target back to our standard one. Otherwise clients will have no way to clear their custom drop target.
Fixed. New patch coming soon.
Brian Weinstein
Comment 4
2011-05-17 15:21:44 PDT
Created
attachment 93832
[details]
[PATCH] Fix v2
Adam Roben (:aroben)
Comment 5
2011-05-17 15:24:31 PDT
Comment on
attachment 93832
[details]
[PATCH] Fix v2 View in context:
https://bugs.webkit.org/attachment.cgi?id=93832&action=review
> Source/WebKit2/UIProcess/win/WebView.cpp:1132 > +void WebView::setCustomDropTarget(IDropTarget* dropTarget) > +{ > + ::RevokeDragDrop(m_window); > + > + if (dropTarget) > + ::RegisterDragDrop(m_window, dropTarget); > + else > + ::RegisterDragDrop(m_window, this); > +}
This won't work correctly if m_window has been destroyed or the page has already been closed. We shouldn't do anything in those cases.
Brian Weinstein
Comment 6
2011-05-17 15:30:32 PDT
Created
attachment 93834
[details]
[PATCH] Fix v3
Brian Weinstein
Comment 7
2011-05-17 16:17:35 PDT
Landed in
r86717
.
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