RESOLVED FIXED Bug 36484
[chromium] correctly handle move drag operations
https://bugs.webkit.org/show_bug.cgi?id=36484
Summary [chromium] correctly handle move drag operations
Tony Chang
Reported 2010-03-23 01:17:18 PDT
[chromium] correctly handle move drag operations
Attachments
Patch (9.50 KB, patch)
2010-03-23 01:19 PDT, Tony Chang
no flags
Patch (9.82 KB, patch)
2010-03-23 19:21 PDT, Tony Chang
no flags
Patch (5.60 KB, patch)
2010-03-25 01:27 PDT, Tony Chang
no flags
Patch (6.87 KB, patch)
2010-03-25 01:32 PDT, Tony Chang
no flags
Patch (7.18 KB, patch)
2010-03-25 17:27 PDT, Tony Chang
no flags
Patch (11.71 KB, patch)
2010-03-25 17:58 PDT, Tony Chang
no flags
Patch for landing (11.70 KB, patch)
2010-03-25 18:36 PDT, Tony Chang
no flags
Tony Chang
Comment 1 2010-03-23 01:19:21 PDT
Tony Chang
Comment 2 2010-03-23 01:20:57 PDT
This is to work around the fact that the "move" maps to DragOperationGeneric (see https://bugs.webkit.org/show_bug.cgi?id=33697). This is consistent with what happens in WebKit/WebKit/win/.
Jian Li
Comment 3 2010-03-23 18:54:07 PDT
> --- a/WebKit/chromium/src/WebViewImpl.cpp > +++ b/WebKit/chromium/src/WebViewImpl.cpp > -unsigned long WebViewImpl::createUniqueIdentifierForRequest() { > +WebDragOperation WebViewImpl::dragTargetDragging(WebCore::DragData* dragData, bool isEntering) > +{ I think the creation of DragData could also be shared in this function. DragData dragData( m_currentDragData.get(), clientPoint, screenPoint, static_cast<DragOperation>(operationsAllowed)); > --- a/WebKit/chromium/src/WebViewImpl.h > +++ b/WebKit/chromium/src/WebViewImpl.h > + // Consolidate some common code between starting a drag over a target and > + // updating a drag over a target. If we're starting a drag, |isEntering| > + // should be true. > + WebDragOperation dragTargetDragging(WebCore::DragData*, bool isEntering); Probably it might be better to call it as dragTargetDragEnterOrOver. In addition, since WebKit does not have line length, we do not need to split the long comment into 3 tidy lines.
Tony Chang
Comment 4 2010-03-23 19:21:09 PDT
Tony Chang
Comment 5 2010-03-23 19:22:19 PDT
(In reply to comment #3) > I think the creation of DragData could also be shared in this function. Done. > Probably it might be better to call it as dragTargetDragEnterOrOver. > In addition, since WebKit does not have line length, we do not need to split > the long comment into 3 tidy lines. I renamed the function to dragTargetDragEnterOrOver, but kept the comment as 3 lines because that matches the style in the rest of the file.
Tony Chang
Comment 6 2010-03-25 01:09:35 PDT
Comment on attachment 51473 [details] Patch Since https://bugs.webkit.org/show_bug.cgi?id=33697 got r+, I'm going to rev this patch to no longer need the GENERIC -> MOVE conversions.
Tony Chang
Comment 7 2010-03-25 01:27:09 PDT
Tony Chang
Comment 8 2010-03-25 01:32:40 PDT
David Levin
Comment 9 2010-03-25 11:43:11 PDT
Comment on attachment 51605 [details] Patch > diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h > + // Consolidate some common code between starting a drag over a target and > + // updating a drag over a target. If we're starting a drag, |isEntering| > + // should be true. > + WebDragOperation dragTargetDragEnterOrOver(const WebPoint& clientPoint, > + const WebPoint& screenPoint, > + bool isEntering); "bool isEntering" should be an enum, so it is clearer at the calling site what the function is being passed (instead of "true/false" be passed into the function).
Tony Chang
Comment 10 2010-03-25 17:27:44 PDT
Tony Chang
Comment 11 2010-03-25 17:29:19 PDT
(In reply to comment #9) > "bool isEntering" should be an enum, so it is clearer at the calling site what > the function is being passed (instead of "true/false" be passed into the > function). Done. New patch up.
David Levin
Comment 12 2010-03-25 17:50:33 PDT
Comment on attachment 51698 [details] Patch > diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h > + // Consolidate some common code between starting a drag over a target and > + // updating a drag over a target. If we're starting a drag, |isEntering| Single space after . in comments (in WK land). Sorry, I should have caught this last time.
Tony Chang
Comment 13 2010-03-25 17:58:19 PDT
Tony Chang
Comment 14 2010-03-25 17:59:14 PDT
(In reply to comment #12) > (From update of attachment 51698 [details]) > > > diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h > > + // Consolidate some common code between starting a drag over a target and > > + // updating a drag over a target. If we're starting a drag, |isEntering| > > Single space after . in comments (in WK land). Sorry, I should have caught this > last time. Fixed throughout the file. If this is really something that's important, it should be in the style checker.
Tony Chang
Comment 15 2010-03-25 18:36:42 PDT
Created attachment 51707 [details] Patch for landing
WebKit Commit Bot
Comment 16 2010-03-25 22:48:39 PDT
Comment on attachment 51707 [details] Patch for landing Clearing flags on attachment: 51707 Committed r56603: <http://trac.webkit.org/changeset/56603>
WebKit Commit Bot
Comment 17 2010-03-25 22:48:44 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.