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}