Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Issue 2441023003: Align drag feedback for links with draggable="true" to Safari. (Closed)

Created:
4 years, 2 months ago by pwnall
Modified:
4 years, 1 month ago
Reviewers:
dcheng
CC:
chromium-reviews, blink-reviews, dcheng
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Align drag feedback for links with draggable="true" to Safari. On top of the W3C Drag and Drop specification [1, 2], we have special handling for images and links. When our specialized handling for links triggers, we generate a specialized drag feedback that includes the link's text (title) and the URL. For better or for worse, we always triggerred the specialized behavior for link elements, even when the elements opt into the W3C Drag and Drop specification using the draggable="true" attribute. We inherited this behavior from Safari via WebKit. At some point, Safari updated its behavior and does not trigger its specialized feedback for links that have draggable="true". These links have their drag feedback generated based on their elements' renderings, and the corresponding drag data store is not pre-populated with link data. This CL attempts to get the best from both worlds. Links that have draggable="true" don't get the specialized drag feedback, so their feedback matches the element rendering. However, we do pre-populate their data store according to our specialized behavior. This goes beyond the spec, which only requires a text/uri-list item. We also add text/html and text/plain data items. [1] https://www.w3.org/TR/2010/WD-html5-20101019/dnd.html [2] https://html.spec.whatwg.org/multipage/interaction.html BUG=74302 Committed: https://crrev.com/223360c3b8a6f3a13eb5759bd38edb87bbdb4c01 Cr-Commit-Position: refs/heads/master@{#432435}

Patch Set 1 : Code and tests for link dragging. #

Patch Set 2 : Rebased. #

Total comments: 8

Patch Set 3 : Attempted to address feedback. #

Total comments: 6

Patch Set 4 : Rebased, removed expectations for rebaseline. #

Patch Set 5 : Rebased #

Patch Set 6 : Addressed feedback. #

Patch Set 7 : Preparing for baseline attempt. #

Patch Set 8 : Another attempt to figure out baselines. #

Total comments: 2

Patch Set 9 : Addressed nit. #

Patch Set 10 : Rebased, added dependency on CL that fixes testing logistical issue. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+262 lines, -27 lines) Patch
A third_party/WebKit/LayoutTests/fast/dnd/link-dragging-draggable-div-with-dragged-link.html View 1 2 3 4 5 1 chunk +32 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dnd/link-dragging-draggable-div-with-link.html View 1 2 3 4 5 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dnd/link-dragging-draggable-div-with-link-expected.png View 1 2 4 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/fast/dnd/link-dragging-draggable-link.html View 1 2 3 4 5 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dnd/link-dragging-draggable-link-expected.png View 1 2 4 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/fast/dnd/link-dragging-non-draggable-link.html View 1 2 3 4 5 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dnd/resources/link-dragging-common.css View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/dnd/resources/link-dragging-common.js View 1 2 3 4 5 1 chunk +78 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/fast/dnd/link-dragging-draggable-div-with-dragged-link-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/fast/dnd/link-dragging-non-draggable-link-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/dnd/link-dragging-draggable-div-with-dragged-link-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/dnd/link-dragging-non-draggable-link-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/dnd/link-dragging-draggable-div-with-dragged-link-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/dnd/link-dragging-non-draggable-link-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/fast/dnd/link-dragging-draggable-div-with-dragged-link-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/fast/dnd/link-dragging-non-draggable-link-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/fast/dnd/link-dragging-draggable-div-with-dragged-link-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/fast/dnd/link-dragging-non-draggable-link-expected.png View 1 2 3 4 5 6 7 Binary file 0 comments Download
M third_party/WebKit/Source/core/input/MouseEventManager.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/page/DragController.cpp View 1 2 3 4 5 6 7 8 3 chunks +29 lines, -10 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 60 (48 generated)
pwnall
PTAL?
4 years, 1 month ago (2016-10-25 22:55:59 UTC) #13
dcheng
Two thoughts: 1) Is it possible to test the different drag images by writing individual ...
4 years, 1 month ago (2016-10-27 06:37:54 UTC) #14
pwnall
dcheng@: Thank you so much for mentioning dumpDragImage()! It will be a life saver for ...
4 years, 1 month ago (2016-10-29 00:24:24 UTC) #20
dcheng
https://codereview.chromium.org/2441023003/diff/60001/third_party/WebKit/LayoutTests/fast/dnd/link-dragging-draggable-div-with-dragged-link.html File third_party/WebKit/LayoutTests/fast/dnd/link-dragging-draggable-div-with-dragged-link.html (right): https://codereview.chromium.org/2441023003/diff/60001/third_party/WebKit/LayoutTests/fast/dnd/link-dragging-draggable-div-with-dragged-link.html#newcode26 third_party/WebKit/LayoutTests/fast/dnd/link-dragging-draggable-div-with-dragged-link.html:26: return runLinkDraggingTest(t, { Nit: it's useful to document the ...
4 years, 1 month ago (2016-10-31 22:31:35 UTC) #21
pwnall
dcheng@: Thank you very much for the feedback, and sorry it took me so long ...
4 years, 1 month ago (2016-11-04 23:08:29 UTC) #37
dcheng
LGTM with nit addressed. https://codereview.chromium.org/2441023003/diff/180001/third_party/WebKit/Source/core/page/DragController.cpp File third_party/WebKit/Source/core/page/DragController.cpp (right): https://codereview.chromium.org/2441023003/diff/180001/third_party/WebKit/Source/core/page/DragController.cpp#newcode924 third_party/WebKit/Source/core/page/DragController.cpp:924: // The layoutObject has disappeared, ...
4 years, 1 month ago (2016-11-07 22:16:55 UTC) #40
pwnall
Thank you very much for the review! I'll land this after we figure out testharness.js ...
4 years, 1 month ago (2016-11-07 23:21:16 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2441023003/220001
4 years, 1 month ago (2016-11-16 01:53:36 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/338198)
4 years, 1 month ago (2016-11-16 02:55:11 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2441023003/220001
4 years, 1 month ago (2016-11-16 08:17:18 UTC) #56
commit-bot: I haz the power
Committed patchset #10 (id:220001)
4 years, 1 month ago (2016-11-16 08:48:13 UTC) #58
commit-bot: I haz the power
4 years, 1 month ago (2016-11-16 08:50:05 UTC) #60
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/223360c3b8a6f3a13eb5759bd38edb87bbdb4c01
Cr-Commit-Position: refs/heads/master@{#432435}

Powered by Google App Engine
This is Rietveld 408576698