Bug 76808 - Web Inspector: Inspecting an element inside an iframe no longer works
Summary: Web Inspector: Inspecting an element inside an iframe no longer works
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: http://www.iframehtml.com/
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-22 22:41 PST by Darth
Modified: 2012-01-23 07:10 PST (History)
11 users (show)

See Also:


Attachments
Patch (6.33 KB, patch)
2012-01-23 06:52 PST, Pavel Feldman
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darth 2012-01-22 22:41:11 PST
On a page with an iframe, for example http://www.iframehtml.com/ try to right click and inspect some dom element inside the iframe.
Web inspector fails to drill down to the element. Same thing can be noticed if using the magnifying/search glass icon.

This seems a regression, possibly related to #document change https://bugs.webkit.org/show_bug.cgi?id=76550

If you manually open the iframe in web inspector and try right clicking the element on the page and inspecting again, it will then properly drill down to the element in the inspector.
Comment 1 Pavel Feldman 2012-01-23 06:52:58 PST
Created attachment 123553 [details]
Patch
Comment 2 Timothy Hatcher 2012-01-23 06:56:23 PST
Comment on attachment 123553 [details]
Patch

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

> Source/WebCore/inspector/front-end/DOMAgent.js:243
>          }
> -
>          DOMAgent.requestChildNodes(this.id, mycallback.bind(this));

I prefer empty lines line this. Otherwise it feels too crowded.

> Source/WebCore/inspector/front-end/DOMAgent.js:402
> +        if (this._contentDocument)
> +            return;

Maybe this deserves a comment? It needs to be this way because the children are set in the constructor?
Comment 3 Pavel Feldman 2012-01-23 07:08:41 PST
(In reply to comment #2)
> (From update of attachment 123553 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=123553&action=review
> 
> > Source/WebCore/inspector/front-end/DOMAgent.js:243
> >          }
> > -
> >          DOMAgent.requestChildNodes(this.id, mycallback.bind(this));
> 
> I prefer empty lines line this. Otherwise it feels too crowded.
> 

Done.

> > Source/WebCore/inspector/front-end/DOMAgent.js:402
> > +        if (this._contentDocument)
> > +            return;
> 
> Maybe this deserves a comment? It needs to be this way because the children are set in the constructor?

Done.
Comment 4 Pavel Feldman 2012-01-23 07:10:21 PST
Committed r105620: <http://trac.webkit.org/changeset/105620>