Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
| index 3b6b525f7e1b1c0a406c92c5cf409a005432ece1..efafe670b76cc90d7ca1812d80b01f56289e8b07 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
| @@ -69,9 +69,9 @@ WebInspector.CallStackSidebarPane.prototype = { |
| this.callFrames = []; |
| this._hiddenCallFrames = 0; |
| - this._updateStatusMessage(details); |
| - |
| if (!details) { |
| + var infoElement = this.element.createChild("div", "gray-info-message"); |
| + infoElement.textContent = WebInspector.UIString("Not Paused"); |
| WebInspector.context.setFlavor(WebInspector.DebuggerModel.CallFrame, null); |
| return; |
| } |
| @@ -102,7 +102,7 @@ WebInspector.CallStackSidebarPane.prototype = { |
| var showAllLink = element.createChild("span", "link"); |
| showAllLink.textContent = WebInspector.UIString("Show"); |
| showAllLink.addEventListener("click", this._revealHiddenCallFrames.bind(this), false); |
| - this.element.insertBefore(element, this.element.firstChild); |
| + this.element.appendChild(element); |
|
lushnikov
2016/10/12 21:26:58
this seems to be unrelated?
luoe
2016/10/13 00:36:58
Done.
|
| this._hiddenCallFramesMessageElement = element; |
| } |
| this._selectNextVisibleCallFrame(0); |
| @@ -110,52 +110,6 @@ WebInspector.CallStackSidebarPane.prototype = { |
| }, |
| /** |
| - * @param {?WebInspector.DebuggerPausedDetails} details |
| - */ |
| - _updateStatusMessage: function(details) |
| - { |
| - var status = this.contentElement.createChild("div", "callstack-info"); |
| - status.removeChildren(); |
| - |
| - if (!details) { |
| - status.textContent = WebInspector.UIString("Not Paused"); |
| - status.classList.toggle("status", false); |
| - return; |
| - } |
| - |
| - if (details.reason === WebInspector.DebuggerModel.BreakReason.DOM) { |
| - status.appendChild(WebInspector.domBreakpointsSidebarPane.createBreakpointHitStatusMessage(details)); |
| - } else if (details.reason === WebInspector.DebuggerModel.BreakReason.EventListener) { |
| - var eventName = details.auxData["eventName"]; |
| - var eventNameForUI = WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI(eventName, details.auxData); |
| - status.textContent = WebInspector.UIString("Paused on a \"%s\" Event Listener.", eventNameForUI); |
| - } else if (details.reason === WebInspector.DebuggerModel.BreakReason.XHR) { |
| - status.textContent = WebInspector.UIString("Paused on a XMLHttpRequest."); |
| - } else if (details.reason === WebInspector.DebuggerModel.BreakReason.Exception) { |
| - var description = details.auxData["description"] || ""; |
| - status.textContent = WebInspector.UIString("Paused on exception: '%s'.", description.split("\n", 1)[0]); |
| - } else if (details.reason === WebInspector.DebuggerModel.BreakReason.PromiseRejection) { |
| - var description = details.auxData["description"] || ""; |
| - status.textContent = WebInspector.UIString("Paused on promise rejection: '%s'.", description.split("\n", 1)[0]); |
| - } else if (details.reason === WebInspector.DebuggerModel.BreakReason.Assert) { |
| - status.textContent = WebInspector.UIString("Paused on assertion."); |
| - } else if (details.reason === WebInspector.DebuggerModel.BreakReason.DebugCommand) { |
| - status.textContent = WebInspector.UIString("Paused on a debugged function."); |
| - } else { |
| - if (details.callFrames.length) { |
| - var uiLocation = details && details.callFrames.length ? WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation(details.callFrames[0].location()) : null; |
| - var breakpoint = uiLocation ? WebInspector.breakpointManager.findBreakpointOnLine(uiLocation.uiSourceCode, uiLocation.lineNumber) : null; |
| - if (breakpoint) { |
| - status.textContent = WebInspector.UIString("Paused on a JavaScript breakpoint."); |
| - } |
| - } else { |
| - console.warn("ScriptsPanel paused, but callFrames.length is zero."); // TODO remove this once we understand this case better |
| - } |
| - } |
| - status.classList.toggle("hidden", !status.firstChild); |
| - }, |
| - |
| - /** |
| * @param {!Array.<!WebInspector.DebuggerModel.CallFrame>} callFrames |
| * @return {!Array<!WebInspector.CallStackSidebarPane.CallFrame>} |
| */ |