Skip to content

Conversation

@Ahmad-S792
Copy link
Contributor

@Ahmad-S792 Ahmad-S792 commented Oct 29, 2022

dragenter & dragleave events do not include relatedTarget in the event object
https://bugs.webkit.org/show_bug.cgi?id=66547

Reviewed by NOBODY (OOPS!).

This is to align Webkit with Blink / Chrome and Gecko / Firefox also with Web Specifications.

Merge - https://chromium.googlesource.com/chromium/src.git/+/611466a4430557a67478d236ac57dc649b6eee99

Webkit use to set the relatedTarget of boundary
drag events to null. This is not what the spec
says and developers expect.

This commit fix this
by setting the relatedTarget to the element that
the pointer just left/entered (based on the event).

* Source/WebCore/page/EventHandler.h: Update 'dispatchDragEvent' to have "relatedTarget"
* Source/WebCore/page/EventHandler.cpp:
(EventHandler::handlePasteGlobalSelection): Add "relatedTarget"
(EventHandler::dispatchDragEvent): Add logic about "relatedTarget" and updated to return rather than "0" to "relatedTarget"
(EventHandler::DragTargetResponse EventHandler::updateDragAndDrop): Update response to add "dragTarget" and "nullptr"
(EventHandler::DragTargetResponse EventHandler::cancelDragAndDrop): Update response of "nullptr"

486642e

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ❌ 🛠 ios ❌ 🛠 mac ✅ 🛠 wpe ❌ 🛠 🧪 win
✅ 🧪 bindings ❌ 🛠 ios-sim ❌ 🛠 mac-debug ❌ 🛠 gtk ❌ 🛠 wincairo
✅ 🧪 webkitperl ❌ 🧪 ios-wk2 ❌ 🛠 mac-AS-debug ❌ 🧪 gtk-wk2
❌ 🧪 api-ios ❌ 🧪 api-mac ❌ 🧪 api-gtk
✅ 🛠 tv ❌ 🧪 mac-wk1
✅ 🛠 tv-sim ❌ 🧪 mac-wk2
✅ 🛠 watch ❌ 🧪 mac-AS-debug-wk2
✅ 🛠 watch-sim ❌ 🧪 mac-wk2-stress

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 29, 2022
…t object

dragenter & dragleave events do not include relatedTarget in the event object
https://bugs.webkit.org/show_bug.cgi?id=66547

Reviewed by NOBODY (OOPS!).

This is to align Webkit with Blink / Chrome and Gecko / Firefox also with Web Specifications.

Merge - https://chromium.googlesource.com/chromium/src.git/+/611466a4430557a67478d236ac57dc649b6eee99

Webkit use to set the relatedTarget of boundary
drag events to null. This is not what the spec
says and developers expect.

This commit fix this
by setting the relatedTarget to the element that
the pointer just left/entered (based on the event).

* Source/WebCore/page/EventHandler.h: Update 'dispatchDragEvent' to have "relatedTarget"
* Source/WebCore/page/EventHandler.cpp:
(EventHandler::handlePasteGlobalSelection): Add "relatedTarget"
(EventHandler::dispatchDragEvent): Add logic about "relatedTarget" and updated to return rather than "0" to "relatedTarget"
(EventHandler::DragTargetResponse EventHandler::updateDragAndDrop): Update response to add "dragTarget" and "nullptr"
(EventHandler::DragTargetResponse EventHandler::cancelDragAndDrop): Update response of "nullptr"
@Ahmad-S792 Ahmad-S792 closed this Nov 6, 2022
@Ahmad-S792 Ahmad-S792 deleted the fix66547 branch January 14, 2023 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merging-blocked Applied to prevent a change from being merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants