| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 * @param {string} type | 226 * @param {string} type |
| 227 * @param {boolean} enabled | 227 * @param {boolean} enabled |
| 228 */ | 228 */ |
| 229 _createBreakpointElement: function(node, type, enabled) | 229 _createBreakpointElement: function(node, type, enabled) |
| 230 { | 230 { |
| 231 var element = createElement("li"); | 231 var element = createElement("li"); |
| 232 element._node = node; | 232 element._node = node; |
| 233 element._type = type; | 233 element._type = type; |
| 234 element.addEventListener("contextmenu", this._contextMenu.bind(this, nod
e, type), true); | 234 element.addEventListener("contextmenu", this._contextMenu.bind(this, nod
e, type), true); |
| 235 | 235 |
| 236 var checkboxElement = createElement("input"); | 236 var checkboxLabel = createCheckboxLabel(undefined, enabled); |
| 237 checkboxElement.className = "checkbox-elem"; | 237 checkboxLabel.className = "checkbox-elem"; |
| 238 checkboxElement.type = "checkbox"; | 238 checkboxLabel.checkboxElement.addEventListener("click", this._checkboxCl
icked.bind(this, node, type), false); |
| 239 checkboxElement.checked = enabled; | 239 element._checkboxElement = checkboxLabel.checkboxElement; |
| 240 checkboxElement.addEventListener("click", this._checkboxClicked.bind(thi
s, node, type), false); | 240 element.appendChild(checkboxLabel); |
| 241 element._checkboxElement = checkboxElement; | |
| 242 element.appendChild(checkboxElement); | |
| 243 | 241 |
| 244 var labelElement = createElement("span"); | |
| 245 element.appendChild(labelElement); | |
| 246 | 242 |
| 247 var linkifiedNode = WebInspector.DOMPresentationUtils.linkifyNodeReferen
ce(node); | 243 var linkifiedNode = WebInspector.DOMPresentationUtils.linkifyNodeReferen
ce(node); |
| 248 linkifiedNode.classList.add("monospace"); | 244 linkifiedNode.classList.add("monospace"); |
| 249 labelElement.appendChild(linkifiedNode); | 245 |
| 246 var textElement = checkboxLabel.createChild("span"); |
| 247 textElement.appendChild(linkifiedNode); |
| 250 | 248 |
| 251 var description = createElement("div"); | 249 var description = createElement("div"); |
| 252 description.className = "source-text"; | 250 description.className = "source-text"; |
| 253 description.textContent = this._breakpointTypeLabels[type]; | 251 description.textContent = this._breakpointTypeLabels[type]; |
| 254 labelElement.appendChild(description); | 252 textElement.appendChild(description); |
| 255 | 253 |
| 256 var currentElement = this.listElement.firstChild; | 254 var currentElement = this.listElement.firstChild; |
| 257 while (currentElement) { | 255 while (currentElement) { |
| 258 if (currentElement._type && currentElement._type < element._type) | 256 if (currentElement._type && currentElement._type < element._type) |
| 259 break; | 257 break; |
| 260 currentElement = currentElement.nextSibling; | 258 currentElement = currentElement.nextSibling; |
| 261 } | 259 } |
| 262 this.addListElement(element, currentElement); | 260 this.addListElement(element, currentElement); |
| 263 return element; | 261 return element; |
| 264 }, | 262 }, |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 this.element.appendChild(this.bodyElement); | 472 this.element.appendChild(this.bodyElement); |
| 475 }, | 473 }, |
| 476 | 474 |
| 477 __proto__: WebInspector.SidebarPane.prototype | 475 __proto__: WebInspector.SidebarPane.prototype |
| 478 } | 476 } |
| 479 | 477 |
| 480 /** | 478 /** |
| 481 * @type {!WebInspector.DOMBreakpointsSidebarPane} | 479 * @type {!WebInspector.DOMBreakpointsSidebarPane} |
| 482 */ | 480 */ |
| 483 WebInspector.domBreakpointsSidebarPane; | 481 WebInspector.domBreakpointsSidebarPane; |
| OLD | NEW |