Bug 76808

Summary: Web Inspector: Inspecting an element inside an iframe no longer works
Product: WebKit Reporter: Darth <priyajeet.hora>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, priyajeet.hora, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://www.iframehtml.com/
Attachments:
Description Flags
Patch timothy: review+

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>