Bug 31732

Summary: Web Inspector: Cannot select elements within iframes with the magnifying glass.
Product: WebKit Reporter: jimmy
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, dbates, joepeck, keishi, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed fix.
yurys: review-
[PATCH] Proposed fix. yurys: review+

Description jimmy 2009-11-20 11:26:21 PST
When you attempt to select a form text input or textarea element with the Web Inspector's magnifying glass tool, it incorrectly selects the body of the page. This behavior does not seem to occur for other form elements like selects and buttons.
Comment 1 jimmy 2010-04-08 18:01:56 PDT
I discovered today the the same thing will happen for elements inside iframes. If you activate the magnifying glass tool and hover an element which is inside an iframe, it is correctly highlighted with a blue box, but clicking on it will select the parent frame's body tag in the inspector.
Comment 2 Pavel Feldman 2010-04-09 00:42:50 PDT
Created attachment 52945 [details]
[PATCH] Proposed fix.
Comment 3 Yury Semikhatsky 2010-04-09 04:22:41 PDT
Comment on attachment 52945 [details]
[PATCH] Proposed fix.

>  void InspectorController::inspect(Node* node)
>  {
> -    if (!canPassNodeToJavaScript(node) || !enabled())
> -        return;
> -
If (!enabled) check should be preserved. r- for that

Would be really nice if we started accompanying Web Inspector changes with tests.
Comment 4 Pavel Feldman 2010-04-09 06:20:44 PDT
Created attachment 52952 [details]
[PATCH] Proposed fix.

In fact I needed to fix more to make it work.
Comment 5 Pavel Feldman 2010-04-09 06:45:08 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/InspectorController.cpp
	M	WebCore/inspector/InspectorController.h
	M	WebCore/page/EventHandler.cpp
Committed r57337