|
WI.SourcesNavigationSidebarPanel = class SourcesNavigationSidebarPanel extends W
a/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js_sec1
|
| 101 |
this._pauseReasonLinkContainerElement = document.createElement("span"); |
101 |
this._pauseReasonLinkContainerElement = document.createElement("span"); |
| 102 |
this._pauseReasonTextRow = new WI.DetailsSectionTextRow; |
102 |
this._pauseReasonTextRow = new WI.DetailsSectionTextRow; |
| 103 |
this._pauseReasonGroup = new WI.DetailsSectionGroup([this._pauseReasonTextRow]); |
103 |
this._pauseReasonGroup = new WI.DetailsSectionGroup([this._pauseReasonTextRow]); |
| 104 |
this._pauseReasonSection = new WI.DetailsSection("paused-reason", WI.UIString("Pause Reason"), [this._pauseReasonGroup], this._pauseReasonLinkContainerElement); |
104 |
let pauseReasonSection = new WI.DetailsSection("paused-reason", WI.UIString("Pause Reason"), [this._pauseReasonGroup], this._pauseReasonLinkContainerElement); |
|
|
105 |
|
| 106 |
this._pauseReasonContainer = document.createElement("div"); |
| 107 |
this._pauseReasonContainer.className = "pause-reason-container"; |
| 108 |
this._pauseReasonContainer.appendChild(pauseReasonSection.element); |
| 105 |
|
109 |
|
| 106 |
this._callStackTreeOutline = this.createContentTreeOutline({suppressFiltering: true}); |
110 |
this._callStackTreeOutline = this.createContentTreeOutline({suppressFiltering: true}); |
|
|
111 |
this._callStackTreeOutline.addEventListener(WI.TreeOutline.Event.ElementAdded, this._handleCallStackElementAddedOrRemoved, this); |
| 112 |
this._callStackTreeOutline.addEventListener(WI.TreeOutline.Event.ElementRemoved, this._handleCallStackElementAddedOrRemoved, this); |
| 107 |
this._callStackTreeOutline.addEventListener(WI.TreeOutline.Event.SelectionDidChange, this._handleTreeSelectionDidChange, this); |
113 |
this._callStackTreeOutline.addEventListener(WI.TreeOutline.Event.SelectionDidChange, this._handleTreeSelectionDidChange, this); |
| 108 |
|
114 |
|
| 109 |
let callStackRow = new WI.DetailsSectionRow; |
115 |
let callStackRow = new WI.DetailsSectionRow; |
| 110 |
callStackRow.element.appendChild(this._callStackTreeOutline.element); |
116 |
callStackRow.element.appendChild(this._callStackTreeOutline.element); |
| 111 |
|
117 |
|
| 112 |
let callStackGroup = new WI.DetailsSectionGroup([callStackRow]); |
118 |
let callStackGroup = new WI.DetailsSectionGroup([callStackRow]); |
| 113 |
this._callStackSection = new WI.DetailsSection("call-stack", WI.UIString("Call Stack"), [callStackGroup]); |
119 |
let callStackSection = new WI.DetailsSection("call-stack", WI.UIString("Call Stack"), [callStackGroup]); |
|
|
120 |
|
| 121 |
this._callStackContainer = document.createElement("div"); |
| 122 |
this._callStackContainer.className = "call-stack-container"; |
| 123 |
this._callStackContainer.appendChild(callStackSection.element); |
| 114 |
|
124 |
|
| 115 |
this._mainTargetTreeElement = null; |
125 |
this._mainTargetTreeElement = null; |
| 116 |
this._activeCallFrameTreeElement = null; |
126 |
this._activeCallFrameTreeElement = null; |
|
WI.SourcesNavigationSidebarPanel = class SourcesNavigationSidebarPanel extends W
a/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js_sec2
|
| 173 |
|
183 |
|
| 174 |
let breakpointsGroup = new WI.DetailsSectionGroup([breakpointsRow]); |
184 |
let breakpointsGroup = new WI.DetailsSectionGroup([breakpointsRow]); |
| 175 |
let breakpointsSection = new WI.DetailsSection("breakpoints", WI.UIString("Breakpoints"), [breakpointsGroup], breakpointNavigationBarWrapper); |
185 |
let breakpointsSection = new WI.DetailsSection("breakpoints", WI.UIString("Breakpoints"), [breakpointsGroup], breakpointNavigationBarWrapper); |
| 176 |
this.contentView.element.insertBefore(breakpointsSection.element, this.contentView.element.firstChild); |
186 |
|
|
|
187 |
let breakpointsContainer = this.contentView.element.insertBefore(document.createElement("div"), this.contentView.element.firstChild); |
| 188 |
breakpointsContainer.classList.add("breakpoints-container"); |
| 189 |
breakpointsContainer.appendChild(breakpointsSection.element); |
| 177 |
|
190 |
|
| 178 |
this._resourcesTreeOutline = this.contentTreeOutline; |
191 |
this._resourcesTreeOutline = this.contentTreeOutline; |
| 179 |
this._resourcesTreeOutline.addEventListener(WI.TreeOutline.Event.SelectionDidChange, this._handleTreeSelectionDidChange, this); |
192 |
this._resourcesTreeOutline.addEventListener(WI.TreeOutline.Event.SelectionDidChange, this._handleTreeSelectionDidChange, this); |
|
WI.SourcesNavigationSidebarPanel = class SourcesNavigationSidebarPanel extends W
a/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js_sec3
|
| 202 |
this._resourceTypeScopeBar.addEventListener(WI.ScopeBar.Event.SelectionChanged, this._handleResourceTypeScopeBarSelectionChanged, this); |
215 |
this._resourceTypeScopeBar.addEventListener(WI.ScopeBar.Event.SelectionChanged, this._handleResourceTypeScopeBarSelectionChanged, this); |
| 203 |
this._resourcesNavigationBar.addNavigationItem(this._resourceTypeScopeBar); |
216 |
this._resourcesNavigationBar.addNavigationItem(this._resourceTypeScopeBar); |
| 204 |
|
217 |
|
|
|
218 |
this._resourcesNavigationBar.addNavigationItem(new WI.FlexibleSpaceNavigationItem); |
| 219 |
|
| 220 |
let resourceGroupingModeNavigationItem = new WI.ButtonNavigationItem("grouping-mode", WI.UIString("Grouping Mode"), "Images/Gear.svg", 15, 15); |
| 221 |
resourceGroupingModeNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low; |
| 222 |
resourceGroupingModeNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._handleResourceGroupingModeNavigationitemClicked, this); |
| 223 |
this._resourcesNavigationBar.addNavigationItem(resourceGroupingModeNavigationItem); |
| 224 |
|
| 225 |
let resourcesContainer = this.contentView.element.insertBefore(document.createElement("div"), this._resourcesNavigationBar.element.nextSibling); |
| 226 |
resourcesContainer.classList.add("resources-container"); |
| 227 |
|
| 228 |
this._resourcesTreeOutline = this.contentTreeOutline; |
| 229 |
this._resourcesTreeOutline.addEventListener(WI.TreeOutline.Event.SelectionDidChange, this._handleTreeSelectionDidChange, this); |
| 230 |
this._resourcesTreeOutline.includeSourceMapResourceChildren = true; |
| 231 |
resourcesContainer.appendChild(this._resourcesTreeOutline.element); |
| 232 |
|
| 205 |
let onlyShowResourcesWithIssuesFilterFunction = (treeElement) => { |
233 |
let onlyShowResourcesWithIssuesFilterFunction = (treeElement) => { |
| 206 |
if (treeElement.treeOutline !== this._resourcesTreeOutline) |
234 |
if (treeElement.treeOutline !== this._resourcesTreeOutline) |
| 207 |
return true; |
235 |
return true; |
|
WI.SourcesNavigationSidebarPanel = class SourcesNavigationSidebarPanel extends W
a/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js_sec4
|
| 1317 |
console.error("Unknown tree element", treeElement); |
1345 |
console.error("Unknown tree element", treeElement); |
| 1318 |
} |
1346 |
} |
| 1319 |
|
1347 |
|
|
|
1348 |
_handleCallStackElementAddedOrRemoved(event) |
| 1349 |
{ |
| 1350 |
function walk(parent) { |
| 1351 |
let count = 0; |
| 1352 |
if (!parent.root) |
| 1353 |
++count; |
| 1354 |
|
| 1355 |
for (let child of parent.children) |
| 1356 |
count += walk(child); |
| 1357 |
|
| 1358 |
// Don't count the main thread element when it's hidden. |
| 1359 |
if (parent instanceof WI.ThreadTreeElement && WI.targets.length === 1) |
| 1360 |
--count; |
| 1361 |
|
| 1362 |
return count; |
| 1363 |
} |
| 1364 |
this.element.style.setProperty("--call-stack-count", walk(this._callStackTreeOutline)); |
| 1365 |
} |
| 1366 |
|
| 1320 |
_handleBreakpointElementAddedOrRemoved(event) |
1367 |
_handleBreakpointElementAddedOrRemoved(event) |
| 1321 |
{ |
1368 |
{ |
| 1322 |
let treeElement = event.data.element; |
1369 |
let treeElement = event.data.element; |
|
WI.SourcesNavigationSidebarPanel = class SourcesNavigationSidebarPanel extends W
a/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js_sec5
|
| 1329 |
|
1376 |
|
| 1330 |
if (setting) |
1377 |
if (setting) |
| 1331 |
setting.value = !!treeElement.parent; |
1378 |
setting.value = !!treeElement.parent; |
|
|
1379 |
|
| 1380 |
function walk(parent) { |
| 1381 |
let count = 0; |
| 1382 |
if (!parent.root) |
| 1383 |
++count; |
| 1384 |
for (let child of parent.children) |
| 1385 |
count += walk(child); |
| 1386 |
return count; |
| 1387 |
} |
| 1388 |
this.element.style.setProperty("--breakpoints-count", walk(this._breakpointsTreeOutline)); |
| 1332 |
} |
1389 |
} |
| 1333 |
|
1390 |
|
| 1334 |
_handleCreateBreakpointMouseDown(event) |
1391 |
_handleCreateBreakpointMouseDown(event) |
|
WI.SourcesNavigationSidebarPanel = class SourcesNavigationSidebarPanel extends W
a/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js_sec6
|
| 1501 |
|
1558 |
|
| 1502 |
_handleDebuggerPaused(event) |
1559 |
_handleDebuggerPaused(event) |
| 1503 |
{ |
1560 |
{ |
| 1504 |
this.contentView.element.insertBefore(this._callStackSection.element, this.contentView.element.firstChild); |
1561 |
this.contentView.element.insertBefore(this._callStackContainer, this.contentView.element.firstChild); |
| 1505 |
|
1562 |
|
| 1506 |
if (this._updatePauseReason()) |
1563 |
if (this._updatePauseReason()) |
| 1507 |
this.contentView.element.insertBefore(this._pauseReasonSection.element, this.contentView.element.firstChild); |
1564 |
this.contentView.element.insertBefore(this._pauseReasonContainer, this.contentView.element.firstChild); |
| 1508 |
|
1565 |
|
| 1509 |
this._debuggerPauseResumeButtonItem.enabled = true; |
1566 |
this._debuggerPauseResumeButtonItem.enabled = true; |
| 1510 |
this._debuggerPauseResumeButtonItem.toggled = true; |
1567 |
this._debuggerPauseResumeButtonItem.toggled = true; |
|
WI.SourcesNavigationSidebarPanel = class SourcesNavigationSidebarPanel extends W
a/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js_sec7
|
| 1517 |
|
1574 |
|
| 1518 |
_handleDebuggerResumed(event) |
1575 |
_handleDebuggerResumed(event) |
| 1519 |
{ |
1576 |
{ |
| 1520 |
this._callStackSection.element.remove(); |
1577 |
this._callStackContainer.remove(); |
| 1521 |
|
1578 |
|
| 1522 |
this._pauseReasonSection.element.remove(); |
1579 |
this._pauseReasonContainer.remove(); |
| 1523 |
|
1580 |
|
| 1524 |
this._debuggerPauseResumeButtonItem.enabled = true; |
1581 |
this._debuggerPauseResumeButtonItem.enabled = true; |
| 1525 |
this._debuggerPauseResumeButtonItem.toggled = false; |
1582 |
this._debuggerPauseResumeButtonItem.toggled = false; |