Summary: Should be able to push nodes in an iframe subtree to the frontend. Steps to Reproduce: 1. Inspect theverge.com > goto Elements tab 2. Locate an iframe element (Cmd+F helps) 3. Expand the iframe's #document node, select the <html> element 4. Reload page => Expected: iframe's <html> element selected after DOM tree refresh => Actual: the default element (main frame <body>) is selected Note: It looks like InspectorDOMAgent::nodeForPath is halting when it encounters the iframe element, because InspectorDOMAgent::innerChildNodeCount returns 0.
(In reply to comment #0) > Note: > It looks like InspectorDOMAgent::nodeForPath is halting when it encounters > the iframe element, because InspectorDOMAgent::innerChildNodeCount returns 0. Due to the check for matching URLs on DOMTreeContentView.js:365, elements in an iframe's subtree are never requested via InspectorDOMAgent::pushNodeByPathToFrontend. Commenting out the check results in the protocol method being called, but the agent still fails to push the node for the reason above.
Created attachment 303230 [details] [WebArchive] Test page for iframes/frameset Test page includes: -iframe with src="about:blank" -iframe with <frameset> source* -iframe with srcdoc content *Although <frameset> is deprecated in HTML5, the fix for this bug should just work for all nodes derived from WebCore::HTMLFrameElementBase.
Created attachment 303296 [details] Patch
Created attachment 303297 [details] [Video] Restoring selection from iframe DOM node
Comment on attachment 303296 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=303296&action=review Neat! r=me > Source/WebCore/inspector/InspectorDOMAgent.cpp:2170 > + return 0; Style: You may want to change all of these `return 0` to `return nullptr`. I thought we had already updated our code to use nullptr, but clearly not. > LayoutTests/inspector/dom/push-node-by-path-to-frontend.html:13 > + name, > + description, Style: I normally do `name, description` on one line since multiline these don't add much.
Created attachment 303299 [details] Patch for landing
Comment on attachment 303299 [details] Patch for landing Clearing flags on attachment: 303299 Committed r213353: <http://trac.webkit.org/changeset/213353>
All reviewed patches have been landed. Closing bug.