Summary: | Web Inspector: Elements tab details sidebar becomes non-expandable after using Console tab | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
Component: | Web Inspector | Assignee: | Timothy Hatcher <timothy> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Joseph Pecoraro
2015-04-25 20:33:19 PDT
Apparently in this case, the currentRepresentedObjects is an empty list despite the DOM Tree appearing to have a selected node. Selecting a different node fixes the UI. Indeed, in this scenario the Path Components are also empty. I don't even see WebInspector.FrameResourceManager.Event.MainFrameDidChange getting dispatched at all. I wonder what is broken as a result? (In reply to comment #4) > I don't even see WebInspector.FrameResourceManager.Event.MainFrameDidChange > getting dispatched at all. I wonder what is broken as a result? Hmm, maybe that is fine. Maybe the frame isn't changing just the main resource. Something updates the DOM Tree and its selection, whatever does should be updating the current selected represented objects. Just don't know what updates that yet. Well this is very weird. DOMTreeContentView selected node changes trigger the right things. However, during the last of these events, the DOMTreeOutline.selectedTreeElement is null, which of course leads to what we have. The DOMTreeContentView updates the selected node multiples times, ending up with: - <html> (root node?) - null (removing all nodes) - <body> (restoring selection) But in the process of revealAndSelect for <body> it fails to create a tree element for it. It looks like during creation it walks up the DOMNode hierarchy, trying to find a DOMTreeElement parent (which should be the DOMTreeElement for the <html> node) and doesn't find one, so it doesn't create a tree element. I don't know what is different here. I'm seeing "Error during DOMAgent operation: No node with given path found". Looks like we might be asking to push the node path for the last selected path component too soon. Having ElementsTabContentView close and open a new DOMTreeContentView for each main frame main resource change fixes the sidebar issue, but the last DOM node still ins't restored on reload. Delaying the call to _restoreSelectedNodeAfterUpdate for 1.5-2 seconds makes it work. But I'm not sure what changed here. There is likely two bugs going on. 1) Even when _restoreSelectedNodeAfterUpdate fails, it should still have a selectedTreeElement. The details sidebars work if you reload with Elements tab showing. And a selected element is visible even when switching from Console. 2) InspectorDOMAgent::pushNodeByPathToFrontend is giving an error when pushing a path. The DOM might not be done being built after the load when we call for the push? Created attachment 251698 [details]
Patch
Filed the DOMAgent error as bug 144231. Comment on attachment 251698 [details]
Patch
NicE! R=ME
> NicE! R=ME
I apparently triggered caps lock while typing this =P
Comment on attachment 251698 [details] Patch Clearing flags on attachment: 251698 Committed r183423: <http://trac.webkit.org/changeset/183423> All reviewed patches have been landed. Closing bug. |