Bug 76550 - Web Inspector: including #document under <iframe> and <frame> is clutter
Summary: Web Inspector: including #document under <iframe> and <frame> is clutter
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: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 09:36 PST by Timothy Hatcher
Modified: 2014-12-13 15:47 PST (History)
11 users (show)

See Also:


Attachments
Example (43.52 KB, image/png)
2012-01-18 09:37 PST, Timothy Hatcher
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2012-01-18 09:36:25 PST
The recent change to included #document under <frame> and <iframe> is clutter IMHO. Why expose the frame documents in the tree when we have never exposed the main document? It introduces yet another level of nesting.

The only benefit I see to including the documents is for event listener and prototype inspection in the sidebar. But then why no show the main document if that is a large advantage? Why not include the window objects in that case too?
Comment 1 Timothy Hatcher 2012-01-18 09:37:39 PST
Created attachment 122947 [details]
Example
Comment 2 Timothy Hatcher 2012-01-18 09:57:09 PST
Note: I agree #document should be in the model, it just shouldn't be rendered in the Elements panel IMHO. If we want them in the panel, we should include the main document too.
Comment 3 Pavel Feldman 2012-01-18 10:01:38 PST
Couple of reasons I felt comfortable leaving it as is:
1) $0 on the document node
2) the amount of iframe nodes per page is not huge.
3) fixing DOMAgent code to hide this element would all unnecessary complexity to the code (where we would populate children array of frame owner with the document's children, etc.
Comment 4 Timothy Hatcher 2012-01-18 10:02:38 PST
The fix would not be in DOMAgent, it would be in ElementTreeOutline.
Comment 5 Timothy Hatcher 2012-01-18 10:04:58 PST
Your probably right, it isn't a huge issue.
Comment 6 Darth 2012-01-21 21:57:57 PST
Unsure if it's related, but at the same time this was introduced, inspect element inside an iframe no longer works.

If your page is an iframe, right clicking an element and inspecting doesn't drill down to the element in web inspector but rather highlights the top level body.

If in web inspector you manually drill down to the iframe in question and then try right click > inspect element, then it works
Comment 7 Timothy Hatcher 2012-01-22 05:30:33 PST
Yep, looks like that regressed at the time #document was added. Can you file a new bug about that?