Bug 143912 - Web Inspector: REGRESSION: dragged node in the DOM Tree isn't positioned correctly
Summary: Web Inspector: REGRESSION: dragged node in the DOM Tree isn't positioned corr...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
Keywords: InRadar
Depends on:
Reported: 2015-04-17 20:41 PDT by Nikita Vasilyev
Modified: 2015-06-04 17:31 PDT (History)
10 users (show)

See Also:

Animated GIF of the problem (2.12 MB, image/gif)
2015-04-17 20:41 PDT, Nikita Vasilyev
no flags Details
[PATCH] Proposed Fix (3.15 KB, patch)
2015-06-04 16:28 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2015-04-17 20:41:34 PDT
Created attachment 251080 [details]
Animated GIF of the problem

See attached animated GIF.


1. Open Resources -> DOM Tree on any page that 
2. Expand the tree deep enough to make it scrollable
3. Start dragging node

The "ghost" node should be positioned right next to the mouse cursor.

The ghost node’s top position is off.
Comment 1 Radar WebKit Bug Importer 2015-04-17 20:42:19 PDT
Comment 2 Nikita Vasilyev 2015-06-02 16:47:22 PDT
We use DOM drag-n-drop API and this could be a regression in WebKit. Looking into it.
Comment 3 Nikita Vasilyev 2015-06-02 17:23:51 PDT
It was broken somewhere between r182781 and r182765: http://trac.webkit.org/log/trunk/?rev=182781&stop_rev=182765
Comment 4 Nikita Vasilyev 2015-06-02 20:45:30 PDT
http://trac.webkit.org/changeset/182765/trunk is likely causing the problem. Enrica, could you take a look since it was your change?
Comment 5 Joseph Pecoraro 2015-06-04 16:18:38 PDT
Seems when PageClientImpl::setDragImage makes the decision to use the WKWebView as the drag view, it needs to covert the location from WKView to WKWebView coordinates.
Comment 6 Joseph Pecoraro 2015-06-04 16:28:41 PDT
Created attachment 254313 [details]
[PATCH] Proposed Fix

I tested:

1. Web Inspector reproducible case above
2. HTML5 drag example (worked before and after just fine) http://html5demos.com/drag in MiniBrowser
3. Dragging an Image off webkit.org in MiniBrowser
Comment 7 WebKit Commit Bot 2015-06-04 17:31:34 PDT
Comment on attachment 254313 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 254313

Committed r185229: <http://trac.webkit.org/changeset/185229>
Comment 8 WebKit Commit Bot 2015-06-04 17:31:38 PDT
All reviewed patches have been landed.  Closing bug.