Web Inspector: Clean up backtrace in Canvas details sidebar
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Nov 2017 06:16:54 +0000 (06:16 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Nov 2017 06:16:54 +0000 (06:16 +0000)
commit4ffd5fc2537ef44cc7ec3d658a96c93aa992be9c
treeb6931939a5eb8728827dd485f143453dece1b571
parent7996b15df64a564217d85cce7c2ad535dec0364a
Web Inspector: Clean up backtrace in Canvas details sidebar
https://bugs.webkit.org/show_bug.cgi?id=179807
<rdar://problem/35604378>

Reviewed by Devin Rousso.

* UserInterface/Controllers/CallFrameTreeController.js: Added.
Display a list of call frames in a tree outline. Browse to the represented
call frame's source code location when a tree element is clicked or selected.

(WI.CallFrameTreeController):
(WI.CallFrameTreeController.prototype.get treeOutline):
(WI.CallFrameTreeController.prototype.get callFrames):
(WI.CallFrameTreeController.prototype.set callFrames):
(WI.CallFrameTreeController.prototype.disconnect):
(WI.CallFrameTreeController.prototype._treeElementClicked):
(WI.CallFrameTreeController.prototype._treeSelectionDidChange):
(WI.CallFrameTreeController.prototype._showSourceCodeLocation):

* UserInterface/Main.html:

* UserInterface/Views/CanvasDetailsSidebarPanel.css:
(.sidebar > .panel.details.canvas .details-section.canvas-backtrace .call-frame): Deleted.
* UserInterface/Views/CanvasDetailsSidebarPanel.js:
(WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WI.CanvasDetailsSidebarPanel.prototype._refreshBacktraceSection):

* UserInterface/Views/RecordingTraceDetailsSidebarPanel.css:
(.sidebar > .panel.details.recording-trace > .content > .call-frame): Deleted.
* UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
(WI.RecordingTraceDetailsSidebarPanel):
(WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction):

* UserInterface/Views/TreeElement.js:
(WI.TreeElement.treeElementToggled):
(WI.TreeElement.prototype.selectOnMouseDown):
Prevent selection if parent tree outline is not selectable.

* UserInterface/Views/TreeOutline.css:
(.tree-outline.non-selectable .item:hover):

* UserInterface/Views/TreeOutline.js:
Add `selectable` behavior, set at construction time. When false,
clicking a tree element dispatches an event instead of selecting
the tree element. Default true.

(WI.TreeOutline):
(WI.TreeOutline.prototype.get selectable):
Dispatch click event when not selectable, and some drive-by cleanup.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/CallFrameTreeController.js [new file with mode: 0644]
Source/WebInspectorUI/UserInterface/Main.html
Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.css
Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/RecordingTraceDetailsSidebarPanel.css
Source/WebInspectorUI/UserInterface/Views/RecordingTraceDetailsSidebarPanel.js
Source/WebInspectorUI/UserInterface/Views/TreeElement.js
Source/WebInspectorUI/UserInterface/Views/TreeOutline.css
Source/WebInspectorUI/UserInterface/Views/TreeOutline.js