WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
205758
Add support for DragEvent
https://bugs.webkit.org/show_bug.cgi?id=205758
Summary
Add support for DragEvent
Chris Dumez
Reported
2020-01-03 16:15:40 PST
Add support for DragEvent: -
https://html.spec.whatwg.org/multipage/dnd.html#the-dragevent-interface
Both Blink and Gecko support it. In WebKit, no DragEvent and we added the dataTransfer attribute to MouseEvent instead.
Attachments
WIP Patch
(25.96 KB, patch)
2020-01-03 16:21 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(28.39 KB, patch)
2020-01-03 16:28 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(30.31 KB, patch)
2020-01-03 16:49 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(30.95 KB, patch)
2020-01-03 17:04 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
WIP Patch
(34.33 KB, patch)
2020-01-03 17:42 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(53.06 KB, patch)
2020-01-03 18:11 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(56.21 KB, patch)
2020-01-03 19:15 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(56.27 KB, patch)
2020-01-03 20:31 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2020-01-03 16:21:15 PST
Created
attachment 386726
[details]
WIP Patch
Chris Dumez
Comment 2
2020-01-03 16:28:20 PST
Created
attachment 386728
[details]
WIP Patch
Chris Dumez
Comment 3
2020-01-03 16:49:53 PST
Created
attachment 386731
[details]
WIP Patch
Chris Dumez
Comment 4
2020-01-03 17:04:11 PST
Created
attachment 386733
[details]
WIP Patch
Chris Dumez
Comment 5
2020-01-03 17:42:09 PST
Created
attachment 386736
[details]
WIP Patch
Chris Dumez
Comment 6
2020-01-03 18:11:49 PST
Created
attachment 386739
[details]
Patch
Chris Dumez
Comment 7
2020-01-03 19:15:30 PST
Created
attachment 386745
[details]
Patch
Darin Adler
Comment 8
2020-01-03 19:29:22 PST
Comment on
attachment 386745
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=386745&action=review
> Source/WebCore/dom/DragEvent.h:47 > + static Ref<DragEvent> create(const AtomString& eventType, DragEventInit&& init) > + { > + return adoptRef(*new DragEvent(eventType, WTFMove(init))); > + }
There's no good reason for this function body to be in the header; inlining this at the call site isn’t really valuable since it’s going to call a constructor, which is not inlined. Instead we can let the constructor get inlined in the create function. And so the create function can be in the .cpp file. Nice to have a little less code in the header, I think.
> Source/WebCore/dom/DragEvent.h:52 > + static Ref<DragEvent> createForBindings() > + { > + return adoptRef(*new DragEvent); > + }
Ditto.
> Source/WebCore/dom/DragEvent.idl:33 > + DataTransfer? dataTransfer = null;
Is the "= null" really required?
> Source/WebCore/page/EventHandler.cpp:2255 > + // FIXME: Use DragEvent::create which takes PlatformMouseEvent.
Is this FIXME valuable? Does the suggestec change need to be made? Would it improve things?
> LayoutTests/fast/events/constructors/mouse-event-constructor.html:30 > +shouldBe("new MouseEvent('eventType').dataTransfer", "undefined");
More than just "should be undefined". The property shouldn’t even be present! Might be better to check that. Something ike this: shouldBeFalse("dataTransfer in (new MouseEvent('eventType'))")
Chris Dumez
Comment 9
2020-01-03 20:31:54 PST
Created
attachment 386749
[details]
Patch
WebKit Commit Bot
Comment 10
2020-01-03 23:05:33 PST
Comment on
attachment 386749
[details]
Patch Clearing flags on attachment: 386749 Committed
r254029
: <
https://trac.webkit.org/changeset/254029
>
WebKit Commit Bot
Comment 11
2020-01-03 23:05:35 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12
2020-01-03 23:06:20 PST
<
rdar://problem/58314184
>
Simon Fraser (smfr)
Comment 13
2020-01-04 10:15:36 PST
Build fix in
bug 205765
.
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