Bug 31732 - Web Inspector: Cannot select elements within iframes with the magnifying glass.
Summary: Web Inspector: Cannot select elements within iframes with the magnifying glass.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-20 11:26 PST by jimmy
Modified: 2010-04-09 06:45 PDT (History)
9 users (show)

See Also:


Attachments
[PATCH] Proposed fix. (1.62 KB, patch)
2010-04-09 00:42 PDT, Pavel Feldman
yurys: review-
Details | Formatted Diff | Diff
[PATCH] Proposed fix. (3.62 KB, patch)
2010-04-09 06:20 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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