From a06cbef9f6283cc167796d93fa71784f42ec35bc Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Mon, 3 Dec 2018 08:08:01 +0000 Subject: [PATCH] Reland "DevTools: allow showing views above and below the Sources sidebar." This reverts commit 41f9647f5be04f00b08991980ce92a84f45fb990. Reason for revert: applying fix. Original change's description: > Revert "DevTools: allow showing views above and below the Sources sidebar." > > This reverts commit d21d2ed3a028353e143dfa6708e6c7bbf13fa9fc. > > Reason for revert: Causing devtools_eslint failure > https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8928389307771200912/+/steps/devtools_eslint/0/stdout > > Original change's description: > > DevTools: allow showing views above and below the Sources sidebar. > > > > Change-Id: I76a8edbc45bd6e2d775b48c8f93e288d82bed817 > > Reviewed-on: https://chromium-review.googlesource.com/c/1357513 > > Reviewed-by: Dmitry Gozman > > Commit-Queue: Pavel Feldman > > Cr-Commit-Position: refs/heads/master@{#612830} > > TBR=dgozman@chromium.org,pfeldman@chromium.org,kozy@chromium.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Change-Id: I58fd8fab81766fee2aca0747a78f4ac61647f7cf > Reviewed-on: https://chromium-review.googlesource.com/c/1358118 > Reviewed-by: calamity > Commit-Queue: calamity > Cr-Commit-Position: refs/heads/master@{#613013} TBR=dgozman@chromium.org Change-Id: I0e4cd1fe9585f7ccd365cc449ca0429e0b031141 Reviewed-on: https://chromium-review.googlesource.com/c/1358045 Commit-Queue: Pavel Feldman Reviewed-by: Pavel Feldman Cr-Original-Commit-Position: refs/heads/master@{#613020} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 5e71f37a822fedb49fc168fd3658195445613be5 --- front_end/browser_debugger/module.json | 8 ++++---- front_end/sources/SourcesPanel.js | 7 +++++-- front_end/sources/module.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/front_end/browser_debugger/module.json b/front_end/browser_debugger/module.json index 5593cb1d73..ca831aaf1d 100644 --- a/front_end/browser_debugger/module.json +++ b/front_end/browser_debugger/module.json @@ -2,7 +2,7 @@ "extensions": [ { "type": "view", - "location": "sources-sidebar", + "location": "sources.sidebar-bottom", "id": "sources.eventListenerBreakpoints", "title": "Event Listener Breakpoints", "order": 9, @@ -18,7 +18,7 @@ }, { "type": "view", - "location": "sources-sidebar", + "location": "sources.sidebar-bottom", "id": "sources.xhrBreakpoints", "title": "XHR/fetch Breakpoints", "order": 5, @@ -28,7 +28,7 @@ }, { "type": "view", - "location": "sources-sidebar", + "location": "sources.sidebar-bottom", "id": "sources.domBreakpoints", "title": "DOM Breakpoints", "order": 7, @@ -67,7 +67,7 @@ }, { "type": "view", - "location": "sources-sidebar", + "location": "sources.sidebar-bottom", "id": "sources.globalListeners", "title": "Global Listeners", "order": 8, diff --git a/front_end/sources/SourcesPanel.js b/front_end/sources/SourcesPanel.js index 2860c05e77..40ad095b4a 100644 --- a/front_end/sources/SourcesPanel.js +++ b/front_end/sources/SourcesPanel.js @@ -251,7 +251,8 @@ Sources.SourcesPanel = class extends UI.Panel { * @return {?UI.ViewLocation} */ resolveLocation(locationName) { - if (locationName === 'sources-sidebar') + if (locationName === 'sources.sidebar-top' || locationName === 'sources.sidebar-bottom' || + locationName === 'sources.sidebar-tabs') return this._sidebarPaneStack; else return this._navigatorTabbedLocation; @@ -899,6 +900,7 @@ Sources.SourcesPanel = class extends UI.Panel { this._sidebarPaneStack.widget().element.classList.add('overflow-auto'); this._sidebarPaneStack.widget().show(vbox.element); this._sidebarPaneStack.widget().element.appendChild(this._debuggerPausedMessage.element()); + this._sidebarPaneStack.appendApplicableItems('sources.sidebar-top'); vbox.element.appendChild(this._debugToolbar.element); if (this._threadsSidebarPane) @@ -937,11 +939,12 @@ Sources.SourcesPanel = class extends UI.Panel { this._splitWidget.installResizer(this._debugToolbar.gripElementForResize()); tabbedLocation.appendView(scopeChainView); tabbedLocation.appendView(this._watchSidebarPane); + tabbedLocation.appendApplicableItems('sources.sidebar-tabs'); this._extensionSidebarPanesContainer = tabbedLocation; this.sidebarPaneView = splitWidget; } - this._sidebarPaneStack.appendApplicableItems('sources-sidebar'); + this._sidebarPaneStack.appendApplicableItems('sources.sidebar-bottom'); const extensionSidebarPanes = Extensions.extensionServer.sidebarPanes(); for (let i = 0; i < extensionSidebarPanes.length; ++i) this._addExtensionSidebarPane(extensionSidebarPanes[i]); diff --git a/front_end/sources/module.json b/front_end/sources/module.json index 9a72d3c253..aa91d7da77 100644 --- a/front_end/sources/module.json +++ b/front_end/sources/module.json @@ -715,11 +715,24 @@ { "type": "@UI.ViewLocationResolver", "name": "navigator-view", + "category": "Sources", "className": "Sources.SourcesPanel" }, { "type": "@UI.ViewLocationResolver", - "name": "sources-sidebar", + "name": "sources.sidebar-top", + "category": "Sources", + "className": "Sources.SourcesPanel" + }, + { + "type": "@UI.ViewLocationResolver", + "name": "sources.sidebar-bottom", + "category": "Sources", + "className": "Sources.SourcesPanel" + }, + { + "type": "@UI.ViewLocationResolver", + "name": "sources.sidebar-tabs", "category": "Sources", "className": "Sources.SourcesPanel" },