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 50f07d4a7735e025b4b5a04fc9524b88f4e507e6..b4f18635ed0a0d19b2b218703336dbb580054edc 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
@@ -124,7 +124,7 @@ WebInspector.CallStackSidebarPane.prototype = { |
} |
if (details.reason === WebInspector.DebuggerModel.BreakReason.DOM) { |
- status.appendChild(WebInspector.domBreakpointsSidebarPane.createBreakpointHitStatusMessage(details)); |
+ status.appendChild(this._createDOMBreakpointHitStatusMessage(details)); |
} else if (details.reason === WebInspector.DebuggerModel.BreakReason.EventListener) { |
var eventName = details.auxData["eventName"]; |
var eventNameForUI = WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI(eventName, details.auxData); |
@@ -445,6 +445,46 @@ WebInspector.CallStackSidebarPane.prototype = { |
event.consume(true); |
}, |
+ /** |
+ * @param {!WebInspector.DebuggerPausedDetails} details |
+ * @return {!Element} |
+ */ |
+ _createDOMBreakpointHitStatusMessage: function(details) |
+ { |
+ var auxData = /** @type {!Object} */ (details.auxData); |
+ var message = "Paused on a \"%s\" breakpoint."; |
+ var substitutions = []; |
+ substitutions.push(WebInspector.DOMBreakpointsSidebarPane.BreakpointTypeLabels[auxData["type"]]); |
+ |
+ var domModel = WebInspector.DOMModel.fromTarget(details.target()); |
+ if (!domModel) |
+ return WebInspector.formatLocalized(message, substitutions); |
+ |
+ var node = domModel.nodeForId(auxData["nodeId"]); |
+ var linkifiedNode = WebInspector.DOMPresentationUtils.linkifyNodeReference(node); |
+ substitutions.push(linkifiedNode); |
+ |
+ var targetNode = auxData["targetNodeId"] ? domModel.nodeForId(auxData["targetNodeId"]) : null; |
+ var targetNodeLink = targetNode ? WebInspector.DOMPresentationUtils.linkifyNodeReference(targetNode) : ""; |
+ |
+ if (auxData.type === WebInspector.DOMBreakpointsSidebarPane.BreakpointTypes.SubtreeModified) { |
+ if (auxData["insertion"]) { |
+ if (targetNode !== node) { |
+ message = "Paused on a \"%s\" breakpoint set on %s, because a new child was added to its descendant %s."; |
+ substitutions.push(targetNodeLink); |
+ } else |
+ message = "Paused on a \"%s\" breakpoint set on %s, because a new child was added to that node."; |
+ } else { |
+ message = "Paused on a \"%s\" breakpoint set on %s, because its descendant %s was removed."; |
+ substitutions.push(targetNodeLink); |
+ } |
+ } else { |
+ message = "Paused on a \"%s\" breakpoint set on %s."; |
+ } |
+ |
+ return WebInspector.formatLocalized(message, substitutions); |
+ }, |
+ |
__proto__: WebInspector.SimpleView.prototype |
} |