WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
71324
Expand DragController to provide more information about the dragging session
https://bugs.webkit.org/show_bug.cgi?id=71324
Summary
Expand DragController to provide more information about the dragging session
Jon Lee
Reported
2011-11-01 14:32:20 PDT
In addition to providing the DragOperation, DragController should provide information about whether the user's mouse is over a file element, and how many of the dragged items would be accepted upon drop.
Attachments
Patch
(31.52 KB, patch)
2011-11-01 15:09 PDT
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Patch
(33.56 KB, patch)
2011-11-01 16:00 PDT
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Patch
(34.92 KB, patch)
2011-11-01 16:36 PDT
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Patch
(36.40 KB, patch)
2011-11-01 17:47 PDT
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Patch
(38.70 KB, patch)
2011-11-01 17:53 PDT
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Patch
(43.40 KB, patch)
2011-11-02 12:53 PDT
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Patch
(45.72 KB, patch)
2011-11-02 13:14 PDT
,
Jon Lee
no flags
Details
Formatted Diff
Diff
Patch
(47.93 KB, patch)
2011-11-02 13:59 PDT
,
Jon Lee
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2011-11-01 14:32:54 PDT
<
rdar://problem/10379175
>
Jon Lee
Comment 2
2011-11-01 15:09:05 PDT
Created
attachment 113233
[details]
Patch
WebKit Review Bot
Comment 3
2011-11-01 15:36:35 PDT
Comment on
attachment 113233
[details]
Patch
Attachment 113233
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/10258070
Early Warning System Bot
Comment 4
2011-11-01 15:43:37 PDT
Comment on
attachment 113233
[details]
Patch
Attachment 113233
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/10259068
Jon Lee
Comment 5
2011-11-01 16:00:53 PDT
Created
attachment 113247
[details]
Patch
Early Warning System Bot
Comment 6
2011-11-01 16:33:18 PDT
Comment on
attachment 113247
[details]
Patch
Attachment 113247
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/10148074
Jon Lee
Comment 7
2011-11-01 16:36:44 PDT
Created
attachment 113254
[details]
Patch
WebKit Review Bot
Comment 8
2011-11-01 16:54:38 PDT
Comment on
attachment 113254
[details]
Patch
Attachment 113254
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/10175095
Darin Adler
Comment 9
2011-11-01 16:58:16 PDT
Comment on
attachment 113254
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=113254&action=review
> Source/WebCore/page/DraggingInfo.h:33 > +struct DraggingInfo {
I’m usually not such a big fan of “info” in a class name, since everything in a computer is info or data, and that suffix doesn’t add much.
> Source/WebCore/page/DraggingInfo.h:39 > + bool mouseOverFileInput;
I think a verb in this phrase would help. Like “mouseIsOverFileInput”.
Early Warning System Bot
Comment 10
2011-11-01 17:14:43 PDT
Comment on
attachment 113254
[details]
Patch
Attachment 113254
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/10259099
Jon Lee
Comment 11
2011-11-01 17:17:58 PDT
(In reply to
comment #9
)
> (From update of
attachment 113254
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=113254&action=review
> > > Source/WebCore/page/DraggingInfo.h:33 > > +struct DraggingInfo { > > I’m usually not such a big fan of “info” in a class name, since everything in a computer is info or data, and that suffix doesn’t add much.
How about DragSession?
> > > Source/WebCore/page/DraggingInfo.h:39 > > + bool mouseOverFileInput; > > I think a verb in this phrase would help. Like “mouseIsOverFileInput”.
Done.
Jon Lee
Comment 12
2011-11-01 17:47:26 PDT
Created
attachment 113267
[details]
Patch
Jon Lee
Comment 13
2011-11-01 17:53:35 PDT
Created
attachment 113269
[details]
Patch
WebKit Review Bot
Comment 14
2011-11-01 19:00:04 PDT
Comment on
attachment 113269
[details]
Patch
Attachment 113269
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/10258127
New failing tests: editing/pasteboard/file-input-files-access.html
Collabora GTK+ EWS bot
Comment 15
2011-11-02 03:08:19 PDT
Comment on
attachment 113269
[details]
Patch
Attachment 113269
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/10259202
Jon Lee
Comment 16
2011-11-02 12:53:39 PDT
Created
attachment 113354
[details]
Patch
Jon Lee
Comment 17
2011-11-02 12:56:15 PDT
This latest patch changes a layout test. The expectation now is that dragging a file over a disabled file input does nothing-- previously it would load the file being dragged into the web view.
Jon Lee
Comment 18
2011-11-02 13:14:03 PDT
Created
attachment 113358
[details]
Patch
Jon Lee
Comment 19
2011-11-02 13:59:08 PDT
Created
attachment 113376
[details]
Patch
Darin Adler
Comment 20
2011-11-02 15:08:30 PDT
Comment on
attachment 113376
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=113376&action=review
Not sure I love the name DragSession, but I guess it’s OK.
> Source/WebCore/page/DragController.cpp:353 > + } else > + // We are not over a file input element. The dragged item(s) will only > + // be loaded into the view the number of dragged items is 1. > + dragSession.numberOfItemsToBeAccepted = numberOfFiles != 1 ? 0 : 1;
WebKit coding style says you should use braces here. It’s the number of lines that determines the braces, not the number of statements.
> Source/WebCore/page/DragSession.h:37 > + DragSession() > + : operation(DragOperationNone) > + , mouseIsOverFileInput(false) > + , numberOfItemsToBeAccepted(0) { }
This is not the formatting we use in WebKit code. That would be: DragSession() : operation(DragOperationNone) , mouseIsOverFileInput(false) , numberOfItemsToBeAccepted(0) { } Also, we normally put the constructor after the data members in a separate paragraph when it’s a struct rather than a class.
> Source/WebKit2/UIProcess/WebPageProxy.cpp:186 > + , m_currentDragSession()
You should be able to delete this line of code entirely. The default constructor is called if you don’t explicitly initialize the data member.
Jon Lee
Comment 21
2011-11-02 15:09:49 PDT
Thanks, I will check the patch in with the changes you mentioned.
Jon Lee
Comment 22
2011-11-02 15:33:11 PDT
Committed
r99108
: <
http://trac.webkit.org/changeset/99108
>
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