WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
57909
REGRESSION: Drag & Drop Gmail Attachments doesn't work
https://bugs.webkit.org/show_bug.cgi?id=57909
Summary
REGRESSION: Drag & Drop Gmail Attachments doesn't work
Enrica Casucci
Reported
2011-04-05 17:26:00 PDT
* STEPS TO REPRODUCE: 1) Open Gmail in Safari 2) Compose a message 3) Drag a file from Finder to the Safari window. * EXPECTED RESULTS: The formatting bar should change to 'Drop Files' box and dropping the file should attach it to the message and upload it. * ACTUAL RESULTS: Nothing. The formatting bar doesn't change to the 'Drop Files' box, and if you do drop the file, Safari opens it in the current tab instead of attaching it to the message.
Attachments
Patch
(5.70 KB, patch)
2011-04-05 17:36 PDT
,
Enrica Casucci
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Enrica Casucci
Comment 1
2011-04-05 17:27:09 PDT
<
rdar://problem/9103220
>
Enrica Casucci
Comment 2
2011-04-05 17:36:26 PDT
Created
attachment 88343
[details]
Patch
Simon Fraser (smfr)
Comment 3
2011-04-05 17:48:18 PDT
Comment on
attachment 88343
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=88343&action=review
> Source/WebCore/ChangeLog:12 > + We canno change what platformData() returns on Mac, since there are
"cannot"
Darin Adler
Comment 4
2011-04-05 17:54:04 PDT
Comment on
attachment 88343
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=88343&action=review
r=me as is, but you’ll probably have to merge with my change to this file and you may want to consider changes based on the comments
> Source/WebCore/platform/DragData.h:121 > + NSPasteboard* pasteboard() { return m_pasteboard.get(); }
We’re supposed to format Objective-C type pointer expressions as “NSPasteboard *” rather than “NSPasteboard*”.
> Source/WebKit2/UIProcess/API/mac/WKView.mm:85 > +@interface NSView (WebNSViewDetails)
The right prefix to use in WebKit2 is WK rather than Web, so this should be WKNSViewDetails.
> Source/WebKit2/UIProcess/API/mac/WKView.mm:1458 > +// This code is needed to support drag and drop. AppKit calls _hitTest on all the views in the application > +// if there is no match on the dragTypes.
I don’t understand what you mean by “on all views in the application” here. I think the comment should say that we need to override this to allow us to support drags of all types without declaring all the types in advance. Unless that’s not the reason.
> Source/WebKit2/UIProcess/API/mac/WKView.mm:1464 > + NSView *hitView = [super _hitTest:point dragTypes:types]; > + if (!hitView && [[self superview] mouse:*point inRect:[self frame]]) > + return self; > + return hitView;
I think we could instead just say: if ([[self superview] mouse:*point inRect:[self frame]]) return self; return nil; Then we would not need to declare the WebNSViewDetails category above.
Enrica Casucci
Comment 5
2011-04-06 11:04:56 PDT
Addressed Darin's comments. Landed
http://trac.webkit.org/changeset/83070
WebKit Review Bot
Comment 6
2011-04-06 11:59:58 PDT
http://trac.webkit.org/changeset/83070
might have broken Qt Linux Release The following tests are not passing: media/audio-delete-while-slider-thumb-clicked.html media/audio-mpeg-supported.html media/audio-mpeg4-supported.html media/video-currentTime.html media/video-pause-immediately.html
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