Refactor DragImage setup for images
Make this code use the LayoutImageResource to get the Image to create the DragImage from. This means we can avoid open-coding the SVG image setup since LayoutImageResource::GetImage performs the appropriate setup for us. Move the various validity checks into a new CanDragImage() function and straighten out and simplify DragImageForImage() a bit. In part by splitting out the computation of the drag location/origin to match the link-drag case. Change-Id: I344727973693e28ac4681e0af2154a5a8d263ba2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2563690Reviewed-by:Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#832263}
Showing
Please register or sign in to comment