RESOLVED FIXED Bug 144212
Web Inspector: Elements tab details sidebar becomes non-expandable after using Console tab
https://bugs.webkit.org/show_bug.cgi?id=144212
Summary Web Inspector: Elements tab details sidebar becomes non-expandable after usin...
Joseph Pecoraro
Reported 2015-04-25 20:33:19 PDT
* SUMMARY Elements tab details sidebar becomes non-expandable after using Console tab * STEPS TO REPRODUCE 1. Inspect <http://bogojoker.com/shell/> 2. Show Elements Tab with Details sidebar collapsed 3. Show Console Tab 4. Reload 5. Show Elements Tab => Details Sidebar cannot be expanded, button is disabled * NOTES - Apparently at the end of WebInspector.ContentBrowserTabContentView.prototype._contentBrowserRepresentedObjectsDidChange, WebInspector.detailsSidebar.sidebarPanels.length is 0 even though this.detailsSidebarPanels.length is 3. Somehow the sidebar panels were not added to WebInspector.detailsSidebar correctly.
Attachments
Patch (3.69 KB, patch)
2015-04-26 11:06 PDT, Timothy Hatcher
no flags
Radar WebKit Bug Importer
Comment 1 2015-04-25 20:33:29 PDT
Joseph Pecoraro
Comment 2 2015-04-25 20:40:04 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.
Joseph Pecoraro
Comment 3 2015-04-25 20:44:23 PDT
Indeed, in this scenario the Path Components are also empty.
Joseph Pecoraro
Comment 4 2015-04-25 20:55:08 PDT
I don't even see WebInspector.FrameResourceManager.Event.MainFrameDidChange getting dispatched at all. I wonder what is broken as a result?
Joseph Pecoraro
Comment 5 2015-04-25 20:58:45 PDT
(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.
Joseph Pecoraro
Comment 6 2015-04-25 22:24:51 PDT
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.
Timothy Hatcher
Comment 7 2015-04-26 05:51:47 PDT
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.
Timothy Hatcher
Comment 8 2015-04-26 05:58:12 PDT
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?
Timothy Hatcher
Comment 9 2015-04-26 11:06:13 PDT
Timothy Hatcher
Comment 10 2015-04-26 11:19:40 PDT
Filed the DOMAgent error as bug 144231.
Joseph Pecoraro
Comment 11 2015-04-27 13:43:18 PDT
Comment on attachment 251698 [details] Patch NicE! R=ME
Joseph Pecoraro
Comment 12 2015-04-27 13:43:37 PDT
> NicE! R=ME I apparently triggered caps lock while typing this =P
WebKit Commit Bot
Comment 13 2015-04-27 14:32:11 PDT
Comment on attachment 251698 [details] Patch Clearing flags on attachment: 251698 Committed r183423: <http://trac.webkit.org/changeset/183423>
WebKit Commit Bot
Comment 14 2015-04-27 14:32:14 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.