| 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 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @constructor | 32 * @constructor |
| 33 * @extends {WebInspector.BreakpointsSidebarPaneBase} | 33 * @extends {WebInspector.BreakpointsSidebarPaneBase} |
| 34 */ | 34 */ |
| 35 WebInspector.DOMBreakpointsSidebarPane = function() | 35 WebInspector.DOMBreakpointsSidebarPane = function() |
| 36 { | 36 { |
| 37 WebInspector.BreakpointsSidebarPaneBase.call(this, WebInspector.UIString("DO
M Breakpoints")); | 37 WebInspector.BreakpointsSidebarPaneBase.call(this, WebInspector.UIString("DO
M Breakpoints")); |
| 38 this._domBreakpointsSetting = WebInspector.settings.createLocalSetting("domB
reakpoints", []); | 38 this._domBreakpointsSetting = WebInspector.settings.createLocalSetting("domB
reakpoints", []); |
| 39 this.listElement.classList.add("dom-breakpoints-list"); |
| 39 | 40 |
| 40 this._breakpointElements = {}; | 41 this._breakpointElements = {}; |
| 41 | 42 |
| 42 this._breakpointTypes = { | 43 this._breakpointTypes = { |
| 43 SubtreeModified: "subtree-modified", | 44 SubtreeModified: "subtree-modified", |
| 44 AttributeModified: "attribute-modified", | 45 AttributeModified: "attribute-modified", |
| 45 NodeRemoved: "node-removed" | 46 NodeRemoved: "node-removed" |
| 46 }; | 47 }; |
| 47 this._breakpointTypeLabels = {}; | 48 this._breakpointTypeLabels = {}; |
| 48 this._breakpointTypeLabels[this._breakpointTypes.SubtreeModified] = WebInspe
ctor.UIString("Subtree Modified"); | 49 this._breakpointTypeLabels[this._breakpointTypes.SubtreeModified] = WebInspe
ctor.UIString("Subtree Modified"); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 var element = createElement("li"); | 222 var element = createElement("li"); |
| 222 element._node = node; | 223 element._node = node; |
| 223 element._type = type; | 224 element._type = type; |
| 224 element.addEventListener("contextmenu", this._contextMenu.bind(this, nod
e, type), true); | 225 element.addEventListener("contextmenu", this._contextMenu.bind(this, nod
e, type), true); |
| 225 | 226 |
| 226 var checkboxLabel = createCheckboxLabel("", enabled); | 227 var checkboxLabel = createCheckboxLabel("", enabled); |
| 227 checkboxLabel.addEventListener("click", this._checkboxClicked.bind(this,
node, type), false); | 228 checkboxLabel.addEventListener("click", this._checkboxClicked.bind(this,
node, type), false); |
| 228 element._checkboxElement = checkboxLabel.checkboxElement; | 229 element._checkboxElement = checkboxLabel.checkboxElement; |
| 229 element.appendChild(checkboxLabel); | 230 element.appendChild(checkboxLabel); |
| 230 | 231 |
| 231 var labelElement = createElement("span"); | 232 var labelElement = createElementWithClass("div", "dom-breakpoint"); |
| 232 element.appendChild(labelElement); | 233 element.appendChild(labelElement); |
| 233 | 234 |
| 234 var linkifiedNode = WebInspector.DOMPresentationUtils.linkifyNodeReferen
ce(node); | 235 var linkifiedNode = WebInspector.DOMPresentationUtils.linkifyNodeReferen
ce(node); |
| 235 linkifiedNode.classList.add("monospace"); | 236 linkifiedNode.classList.add("monospace"); |
| 237 linkifiedNode.style.display = "block"; |
| 236 labelElement.appendChild(linkifiedNode); | 238 labelElement.appendChild(linkifiedNode); |
| 237 | 239 |
| 238 var description = createElement("div"); | 240 var description = createElement("div"); |
| 239 description.className = "source-text"; | |
| 240 description.textContent = this._breakpointTypeLabels[type]; | 241 description.textContent = this._breakpointTypeLabels[type]; |
| 241 labelElement.appendChild(description); | 242 labelElement.appendChild(description); |
| 242 | 243 |
| 243 var currentElement = this.listElement.firstChild; | 244 var currentElement = this.listElement.firstChild; |
| 244 while (currentElement) { | 245 while (currentElement) { |
| 245 if (currentElement._type && currentElement._type < element._type) | 246 if (currentElement._type && currentElement._type < element._type) |
| 246 break; | 247 break; |
| 247 currentElement = currentElement.nextSibling; | 248 currentElement = currentElement.nextSibling; |
| 248 } | 249 } |
| 249 this.addListElement(element, currentElement); | 250 this.addListElement(element, currentElement); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 this._wrappedPane.show(this.element); | 457 this._wrappedPane.show(this.element); |
| 457 }, | 458 }, |
| 458 | 459 |
| 459 __proto__: WebInspector.SidebarPane.prototype | 460 __proto__: WebInspector.SidebarPane.prototype |
| 460 } | 461 } |
| 461 | 462 |
| 462 /** | 463 /** |
| 463 * @type {!WebInspector.DOMBreakpointsSidebarPane} | 464 * @type {!WebInspector.DOMBreakpointsSidebarPane} |
| 464 */ | 465 */ |
| 465 WebInspector.domBreakpointsSidebarPane; | 466 WebInspector.domBreakpointsSidebarPane; |
| OLD | NEW |