| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 var breakPointSubMenu = contextMenu.appendSubMenuItem(WebInspector.UIStr
ing("Break on...")); | 116 var breakPointSubMenu = contextMenu.appendSubMenuItem(WebInspector.UIStr
ing("Break on...")); |
| 117 for (var key in this._breakpointTypes) { | 117 for (var key in this._breakpointTypes) { |
| 118 var type = this._breakpointTypes[key]; | 118 var type = this._breakpointTypes[key]; |
| 119 var label = this._contextMenuLabels[type]; | 119 var label = this._contextMenuLabels[type]; |
| 120 breakPointSubMenu.appendCheckboxItem(label, toggleBreakpoint.bind(th
is, type), nodeBreakpoints[type]); | 120 breakPointSubMenu.appendCheckboxItem(label, toggleBreakpoint.bind(th
is, type), nodeBreakpoints[type]); |
| 121 } | 121 } |
| 122 }, | 122 }, |
| 123 | 123 |
| 124 /** | 124 /** |
| 125 * @param {!WebInspector.DebuggerPausedDetails} details | 125 * @param {!WebInspector.DebuggerPausedDetails} details |
| 126 * @param {function(!Element)} callback |
| 126 */ | 127 */ |
| 127 createBreakpointHitStatusMessage: function(details, callback) | 128 createBreakpointHitStatusMessage: function(details, callback) |
| 128 { | 129 { |
| 129 var auxData = /** @type {!Object} */ (details.auxData); | 130 var auxData = /** @type {!Object} */ (details.auxData); |
| 130 var domModel = details.target().domModel; | 131 var domModel = details.target().domModel; |
| 131 if (auxData.type === this._breakpointTypes.SubtreeModified) { | 132 if (auxData.type === this._breakpointTypes.SubtreeModified) { |
| 132 var targetNodeObject = details.target().runtimeModel.createRemoteObj
ect(auxData["targetNode"]); | 133 var targetNodeObject = details.target().runtimeModel.createRemoteObj
ect(auxData["targetNode"]); |
| 133 targetNodeObject.pushNodeToFrontend(didPushNodeToFrontend.bind(this)
); | 134 targetNodeObject.pushNodeToFrontend(didPushNodeToFrontend.bind(this)
); |
| 134 } else { | 135 } else { |
| 135 this._doCreateBreakpointHitStatusMessage(auxData, domModel.nodeForId
(auxData.nodeId), null, callback); | 136 this._doCreateBreakpointHitStatusMessage(auxData, domModel.nodeForId
(auxData.nodeId), null, callback); |
| 136 } | 137 } |
| 137 | 138 |
| 138 /** | 139 /** |
| 139 * @param {?WebInspector.DOMNode} targetNode | 140 * @param {?WebInspector.DOMNode} targetNode |
| 140 * @this {WebInspector.DOMBreakpointsSidebarPane} | 141 * @this {WebInspector.DOMBreakpointsSidebarPane} |
| 141 */ | 142 */ |
| 142 function didPushNodeToFrontend(targetNode) | 143 function didPushNodeToFrontend(targetNode) |
| 143 { | 144 { |
| 144 if (targetNode) | 145 if (targetNode) |
| 145 targetNodeObject.release(); | 146 targetNodeObject.release(); |
| 146 this._doCreateBreakpointHitStatusMessage(auxData, domModel.nodeForId
(auxData.nodeId), targetNode, callback); | 147 this._doCreateBreakpointHitStatusMessage(auxData, domModel.nodeForId
(auxData.nodeId), targetNode, callback); |
| 147 } | 148 } |
| 148 }, | 149 }, |
| 149 | 150 |
| 150 /** | 151 /** |
| 151 * @param {!Object} auxData | 152 * @param {!Object} auxData |
| 152 * @param {?WebInspector.DOMNode} node | 153 * @param {?WebInspector.DOMNode} node |
| 153 * @param {?WebInspector.DOMNode} targetNode | 154 * @param {?WebInspector.DOMNode} targetNode |
| 155 * @param {function(!Element)} callback |
| 154 */ | 156 */ |
| 155 _doCreateBreakpointHitStatusMessage: function(auxData, node, targetNode, cal
lback) | 157 _doCreateBreakpointHitStatusMessage: function(auxData, node, targetNode, cal
lback) |
| 156 { | 158 { |
| 157 var message; | 159 var message; |
| 158 var typeLabel = this._breakpointTypeLabels[auxData.type]; | 160 var typeLabel = this._breakpointTypeLabels[auxData.type]; |
| 159 var linkifiedNode = WebInspector.DOMPresentationUtils.linkifyNodeReferen
ce(node); | 161 var linkifiedNode = WebInspector.DOMPresentationUtils.linkifyNodeReferen
ce(node); |
| 160 var substitutions = [typeLabel, linkifiedNode]; | 162 var substitutions = [typeLabel, linkifiedNode]; |
| 161 var targetNodeLink = ""; | 163 var targetNodeLink = ""; |
| 162 if (targetNode) | 164 if (targetNode) |
| 163 targetNodeLink = WebInspector.DOMPresentationUtils.linkifyNodeRefere
nce(targetNode); | 165 targetNodeLink = WebInspector.DOMPresentationUtils.linkifyNodeRefere
nce(targetNode); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 this.element.appendChild(this.bodyElement); | 453 this.element.appendChild(this.bodyElement); |
| 452 }, | 454 }, |
| 453 | 455 |
| 454 __proto__: WebInspector.SidebarPane.prototype | 456 __proto__: WebInspector.SidebarPane.prototype |
| 455 } | 457 } |
| 456 | 458 |
| 457 /** | 459 /** |
| 458 * @type {!WebInspector.DOMBreakpointsSidebarPane} | 460 * @type {!WebInspector.DOMBreakpointsSidebarPane} |
| 459 */ | 461 */ |
| 460 WebInspector.domBreakpointsSidebarPane; | 462 WebInspector.domBreakpointsSidebarPane; |
| OLD | NEW |