Bug 112983 - Web Inspector: Add command for dispatching mouse event at element's location
Summary: Web Inspector: Add command for dispatching mouse event at element's location
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ken Kania
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-21 17:14 PDT by Ken Kania
Modified: 2014-02-08 19:04 PST (History)
15 users (show)

See Also:


Attachments
Patch (22.40 KB, patch)
2013-03-21 17:25 PDT, Ken Kania
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-06 (1.17 MB, application/zip)
2013-03-22 08:17 PDT, Build Bot
no flags Details
Patch (22.32 KB, patch)
2013-03-22 09:32 PDT, Ken Kania
pfeldman: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-06 for mac-future (573.53 KB, application/zip)
2013-03-23 10:41 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-01 for mac-future (594.52 KB, application/zip)
2013-03-23 13:17 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Kania 2013-03-21 17:14:32 PDT
We'd like to add support for dispatching a mouse event at an element's location. This is particularly needed in order to click moving elements.
Comment 1 Ken Kania 2013-03-21 17:25:26 PDT
Created attachment 194394 [details]
Patch
Comment 2 Antoine Quint 2013-03-22 02:15:17 PDT
The name "dispatchMouseEventAtElement" sounds odd, shouldn't it be "dispatchMouseEventToElement"?
Comment 3 Ken Kania 2013-03-22 07:47:04 PDT
(In reply to comment #2)
> The name "dispatchMouseEventAtElement" sounds odd, shouldn't it be "dispatchMouseEventToElement"?

It is a bit odd, although a bit more accurate. I'll change it though so as not to confuse users.
Comment 4 Build Bot 2013-03-22 08:17:13 PDT
Comment on attachment 194394 [details]
Patch

Attachment 194394 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17202647

New failing tests:
inspector-protocol/input/dispatchMouseEventAtElement-frames.html
Comment 5 Build Bot 2013-03-22 08:17:15 PDT
Created attachment 194552 [details]
Archive of layout-test-results from webkit-ews-06

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-06  Port: <class 'webkitpy.common.config.ports.MacPort'>  Platform: Mac OS X 10.8.2
Comment 6 Pavel Feldman 2013-03-22 08:27:37 PDT
Comment on attachment 194394 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=194394&action=review

> Source/WebCore/inspector/InspectorInputAgent.cpp:189
> +    FloatRect localRect;

Sounds like logic has been copied from somewhere. What if it changes?
Comment 7 Ken Kania 2013-03-22 09:03:58 PDT
(In reply to comment #6)
> (From update of attachment 194394 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=194394&action=review
> 
> > Source/WebCore/inspector/InspectorInputAgent.cpp:189
> > +    FloatRect localRect;
> 
> Sounds like logic has been copied from somewhere. What if it changes?

This was inspired from the node highlighting that DevTools does (http://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/WebCore/inspector/InspectorOverlay.cpp&sq=package:chromium&type=cs&q=InspectorOverlay&l=121). However, it is different in several ways and is greatly simplified.

For inline elements, we take the first line box instead of the bounding box of all the line boxes. For SVG elements, instead of getting all the quads, we just use the stroke bounding box. We also get the local rect first, so we can add the optional offsets before transforming and converting to the root view. It is simplified because unlike InspectorOverlay, we don't care about the margin, padding, or content boxes.

Although at the surface both methods involve getting info from the renderer, their purposes are quite different and I don't think could benefit from any sharing as of now. Let me know if you disagree.
Comment 8 Ken Kania 2013-03-22 09:32:01 PDT
Created attachment 194570 [details]
Patch
Comment 9 Ken Kania 2013-03-22 09:34:40 PDT
(In reply to comment #8)
> Created an attachment (id=194570) [details]
> Patch

Changed name to dispatchMouseEventToElement. Fixed build when svg is disabled.
Comment 10 Build Bot 2013-03-23 10:41:01 PDT
Comment on attachment 194570 [details]
Patch

Attachment 194570 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17306138

New failing tests:
inspector-protocol/input/dispatchMouseEventToElement-frames.html
Comment 11 Build Bot 2013-03-23 10:41:03 PDT
Created attachment 194710 [details]
Archive of layout-test-results from webkit-ews-06 for mac-future

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-06  Port: mac-future  Platform: Mac OS X 10.8.2
Comment 12 Build Bot 2013-03-23 13:17:29 PDT
Comment on attachment 194570 [details]
Patch

Attachment 194570 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17310001

New failing tests:
inspector-protocol/input/dispatchMouseEventToElement-frames.html
Comment 13 Build Bot 2013-03-23 13:17:32 PDT
Created attachment 194717 [details]
Archive of layout-test-results from webkit-ews-01 for mac-future

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01  Port: mac-future  Platform: Mac OS X 10.8.2
Comment 14 BJ Burg 2014-02-08 19:04:35 PST
There are no use cases for this in the new inspector that i'm aware of. Closing until such a time when we know what this is for.