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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 */ | 72 */ |
73 targetRemoved: function(target) | 73 targetRemoved: function(target) |
74 { | 74 { |
75 target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeMo
del.EventTypes.InspectedURLChanged, this._inspectedURLChanged, this); | 75 target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeMo
del.EventTypes.InspectedURLChanged, this._inspectedURLChanged, this); |
76 target.domModel.removeEventListener(WebInspector.DOMModel.Events.NodeRem
oved, this._nodeRemoved, this); | 76 target.domModel.removeEventListener(WebInspector.DOMModel.Events.NodeRem
oved, this._nodeRemoved, this); |
77 }, | 77 }, |
78 | 78 |
79 _inspectedURLChanged: function(event) | 79 _inspectedURLChanged: function(event) |
80 { | 80 { |
81 this._breakpointElements = {}; | 81 this._breakpointElements = {}; |
82 this._reset(); | 82 this.reset(); |
83 var url = /** @type {string} */ (event.data); | 83 var url = /** @type {string} */ (event.data); |
84 this._inspectedURL = url.removeURLFragment(); | 84 this._inspectedURL = url.removeURLFragment(); |
85 }, | 85 }, |
86 | 86 |
87 /** | 87 /** |
88 * @param {!WebInspector.DOMNode} node | 88 * @param {!WebInspector.DOMNode} node |
89 * @param {!WebInspector.ContextMenu} contextMenu | 89 * @param {!WebInspector.ContextMenu} contextMenu |
90 */ | 90 */ |
91 populateNodeContextMenu: function(node, contextMenu) | 91 populateNodeContextMenu: function(node, contextMenu) |
92 { | 92 { |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 description.className = "source-text"; | 247 description.className = "source-text"; |
248 description.textContent = this._breakpointTypeLabels[type]; | 248 description.textContent = this._breakpointTypeLabels[type]; |
249 labelElement.appendChild(description); | 249 labelElement.appendChild(description); |
250 | 250 |
251 var currentElement = this.listElement.firstChild; | 251 var currentElement = this.listElement.firstChild; |
252 while (currentElement) { | 252 while (currentElement) { |
253 if (currentElement._type && currentElement._type < element._type) | 253 if (currentElement._type && currentElement._type < element._type) |
254 break; | 254 break; |
255 currentElement = currentElement.nextSibling; | 255 currentElement = currentElement.nextSibling; |
256 } | 256 } |
257 this._addListElement(element, currentElement); | 257 this.addListElement(element, currentElement); |
258 this._breakpointElements[breakpointId] = element; | 258 this._breakpointElements[breakpointId] = element; |
259 if (enabled) | 259 if (enabled) |
260 DOMDebuggerAgent.setDOMBreakpoint(node.id, type); | 260 DOMDebuggerAgent.setDOMBreakpoint(node.id, type); |
261 }, | 261 }, |
262 | 262 |
263 _removeAllBreakpoints: function() | 263 _removeAllBreakpoints: function() |
264 { | 264 { |
265 for (var id in this._breakpointElements) { | 265 for (var id in this._breakpointElements) { |
266 var element = this._breakpointElements[id]; | 266 var element = this._breakpointElements[id]; |
267 this._removeBreakpoint(element._node, element._type); | 267 this._removeBreakpoint(element._node, element._type); |
268 } | 268 } |
269 this._saveBreakpoints(); | 269 this._saveBreakpoints(); |
270 }, | 270 }, |
271 | 271 |
272 _removeBreakpoint: function(node, type) | 272 _removeBreakpoint: function(node, type) |
273 { | 273 { |
274 var breakpointId = this._createBreakpointId(node.id, type); | 274 var breakpointId = this._createBreakpointId(node.id, type); |
275 var element = this._breakpointElements[breakpointId]; | 275 var element = this._breakpointElements[breakpointId]; |
276 if (!element) | 276 if (!element) |
277 return; | 277 return; |
278 | 278 |
279 this._removeListElement(element); | 279 this.removeListElement(element); |
280 delete this._breakpointElements[breakpointId]; | 280 delete this._breakpointElements[breakpointId]; |
281 if (element._checkboxElement.checked) | 281 if (element._checkboxElement.checked) |
282 DOMDebuggerAgent.removeDOMBreakpoint(node.id, type); | 282 DOMDebuggerAgent.removeDOMBreakpoint(node.id, type); |
283 }, | 283 }, |
284 | 284 |
285 _contextMenu: function(node, type, event) | 285 _contextMenu: function(node, type, event) |
286 { | 286 { |
287 var contextMenu = new WebInspector.ContextMenu(event); | 287 var contextMenu = new WebInspector.ContextMenu(event); |
288 | 288 |
289 /** | 289 /** |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 } | 408 } |
409 | 409 |
410 /** | 410 /** |
411 * @constructor | 411 * @constructor |
412 * @extends {WebInspector.SidebarPane} | 412 * @extends {WebInspector.SidebarPane} |
413 * @param {!WebInspector.DOMBreakpointsSidebarPane} pane | 413 * @param {!WebInspector.DOMBreakpointsSidebarPane} pane |
414 * @param {!WebInspector.Panel} panel | 414 * @param {!WebInspector.Panel} panel |
415 */ | 415 */ |
416 WebInspector.DOMBreakpointsSidebarPane.Proxy = function(pane, panel) | 416 WebInspector.DOMBreakpointsSidebarPane.Proxy = function(pane, panel) |
417 { | 417 { |
418 WebInspector.View._assert(!pane.titleElement.firstChild, "Cannot create prox
y for a sidebar pane with a toolbar"); | 418 WebInspector.View.__assert(!pane.titleElement.firstChild, "Cannot create pro
xy for a sidebar pane with a toolbar"); |
419 | 419 |
420 WebInspector.SidebarPane.call(this, pane.title()); | 420 WebInspector.SidebarPane.call(this, pane.title()); |
421 this.registerRequiredCSS("breakpointsList.css"); | 421 this.registerRequiredCSS("breakpointsList.css"); |
422 | 422 |
423 this._wrappedPane = pane; | 423 this._wrappedPane = pane; |
424 this._panel = panel; | 424 this._panel = panel; |
425 | 425 |
426 this.bodyElement.remove(); | 426 this.bodyElement.remove(); |
427 this.bodyElement = this._wrappedPane.bodyElement; | 427 this.bodyElement = this._wrappedPane.bodyElement; |
428 } | 428 } |
(...skipping 24 matching lines...) Expand all Loading... |
453 this.element.appendChild(this.bodyElement); | 453 this.element.appendChild(this.bodyElement); |
454 }, | 454 }, |
455 | 455 |
456 __proto__: WebInspector.SidebarPane.prototype | 456 __proto__: WebInspector.SidebarPane.prototype |
457 } | 457 } |
458 | 458 |
459 /** | 459 /** |
460 * @type {!WebInspector.DOMBreakpointsSidebarPane} | 460 * @type {!WebInspector.DOMBreakpointsSidebarPane} |
461 */ | 461 */ |
462 WebInspector.domBreakpointsSidebarPane; | 462 WebInspector.domBreakpointsSidebarPane; |
OLD | NEW |