| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) IBM Corp. 2009 All rights reserved. | 2 * Copyright (C) IBM Corp. 2009 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 21 matching lines...) Expand all Loading... |
| 32 * @constructor | 32 * @constructor |
| 33 * @extends {WebInspector.SidebarPane} | 33 * @extends {WebInspector.SidebarPane} |
| 34 */ | 34 */ |
| 35 WebInspector.WatchExpressionsSidebarPane = function() | 35 WebInspector.WatchExpressionsSidebarPane = function() |
| 36 { | 36 { |
| 37 WebInspector.SidebarPane.call(this, WebInspector.UIString("Watch Expressions
")); | 37 WebInspector.SidebarPane.call(this, WebInspector.UIString("Watch Expressions
")); |
| 38 | 38 |
| 39 this.section = new WebInspector.WatchExpressionsSection(); | 39 this.section = new WebInspector.WatchExpressionsSection(); |
| 40 this.bodyElement.appendChild(this.section.element); | 40 this.bodyElement.appendChild(this.section.element); |
| 41 | 41 |
| 42 var refreshButton = document.createElement("button"); | 42 var refreshButton = createElement("button"); |
| 43 refreshButton.className = "pane-title-button refresh"; | 43 refreshButton.className = "pane-title-button refresh"; |
| 44 refreshButton.addEventListener("click", this._refreshButtonClicked.bind(this
), false); | 44 refreshButton.addEventListener("click", this._refreshButtonClicked.bind(this
), false); |
| 45 refreshButton.title = WebInspector.UIString("Refresh"); | 45 refreshButton.title = WebInspector.UIString("Refresh"); |
| 46 this.titleElement.appendChild(refreshButton); | 46 this.titleElement.appendChild(refreshButton); |
| 47 | 47 |
| 48 var addButton = document.createElement("button"); | 48 var addButton = createElement("button"); |
| 49 addButton.className = "pane-title-button add"; | 49 addButton.className = "pane-title-button add"; |
| 50 addButton.addEventListener("click", this._addButtonClicked.bind(this), false
); | 50 addButton.addEventListener("click", this._addButtonClicked.bind(this), false
); |
| 51 this.titleElement.appendChild(addButton); | 51 this.titleElement.appendChild(addButton); |
| 52 addButton.title = WebInspector.UIString("Add watch expression"); | 52 addButton.title = WebInspector.UIString("Add watch expression"); |
| 53 | 53 |
| 54 this._requiresUpdate = true; | 54 this._requiresUpdate = true; |
| 55 WebInspector.context.addFlavorChangeListener(WebInspector.ExecutionContext ,
this.refreshExpressions, this); | 55 WebInspector.context.addFlavorChangeListener(WebInspector.ExecutionContext ,
this.refreshExpressions, this); |
| 56 } | 56 } |
| 57 | 57 |
| 58 WebInspector.WatchExpressionsSidebarPane.prototype = { | 58 WebInspector.WatchExpressionsSidebarPane.prototype = { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 WebInspector.WatchExpressionsSection = function() | 105 WebInspector.WatchExpressionsSection = function() |
| 106 { | 106 { |
| 107 this._watchObjectGroupId = "watch-group"; | 107 this._watchObjectGroupId = "watch-group"; |
| 108 | 108 |
| 109 WebInspector.PropertiesSection.call(this, ""); | 109 WebInspector.PropertiesSection.call(this, ""); |
| 110 this.treeElementConstructor = WebInspector.WatchedPropertyTreeElement; | 110 this.treeElementConstructor = WebInspector.WatchedPropertyTreeElement; |
| 111 this.skipProto = false; | 111 this.skipProto = false; |
| 112 this._expandedExpressions = {}; | 112 this._expandedExpressions = {}; |
| 113 this._expandedProperties = {}; | 113 this._expandedProperties = {}; |
| 114 | 114 |
| 115 this.emptyElement = document.createElement("div"); | 115 this.emptyElement = createElement("div"); |
| 116 this.emptyElement.className = "info"; | 116 this.emptyElement.className = "info"; |
| 117 this.emptyElement.textContent = WebInspector.UIString("No Watch Expressions"
); | 117 this.emptyElement.textContent = WebInspector.UIString("No Watch Expressions"
); |
| 118 | 118 |
| 119 this.watchExpressions = WebInspector.settings.watchExpressions.get(); | 119 this.watchExpressions = WebInspector.settings.watchExpressions.get(); |
| 120 | 120 |
| 121 this.headerElement.className = "hidden"; | 121 this.headerElement.className = "hidden"; |
| 122 this.editable = true; | 122 this.editable = true; |
| 123 this.expanded = true; | 123 this.expanded = true; |
| 124 this.propertiesElement.classList.add("watch-expressions"); | 124 this.propertiesElement.classList.add("watch-expressions"); |
| 125 | 125 |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 update: function() | 406 update: function() |
| 407 { | 407 { |
| 408 WebInspector.ObjectPropertyTreeElement.prototype.update.call(this); | 408 WebInspector.ObjectPropertyTreeElement.prototype.update.call(this); |
| 409 | 409 |
| 410 if (this.property.wasThrown) { | 410 if (this.property.wasThrown) { |
| 411 this.valueElement.textContent = WebInspector.UIString("<not availabl
e>"); | 411 this.valueElement.textContent = WebInspector.UIString("<not availabl
e>"); |
| 412 this.listItemElement.classList.add("dimmed"); | 412 this.listItemElement.classList.add("dimmed"); |
| 413 } else | 413 } else |
| 414 this.listItemElement.classList.remove("dimmed"); | 414 this.listItemElement.classList.remove("dimmed"); |
| 415 | 415 |
| 416 var deleteButton = document.createElement("input"); | 416 var deleteButton = createElement("input"); |
| 417 deleteButton.type = "button"; | 417 deleteButton.type = "button"; |
| 418 deleteButton.title = WebInspector.UIString("Delete watch expression."); | 418 deleteButton.title = WebInspector.UIString("Delete watch expression."); |
| 419 deleteButton.classList.add("enabled-button"); | 419 deleteButton.classList.add("enabled-button"); |
| 420 deleteButton.classList.add("delete-button"); | 420 deleteButton.classList.add("delete-button"); |
| 421 deleteButton.addEventListener("click", this._deleteButtonClicked.bind(th
is), false); | 421 deleteButton.addEventListener("click", this._deleteButtonClicked.bind(th
is), false); |
| 422 this.listItemElement.addEventListener("contextmenu", this._contextMenu.b
ind(this), false); | 422 this.listItemElement.addEventListener("contextmenu", this._contextMenu.b
ind(this), false); |
| 423 this.listItemElement.insertBefore(deleteButton, this.listItemElement.fir
stChild); | 423 this.listItemElement.insertBefore(deleteButton, this.listItemElement.fir
stChild); |
| 424 }, | 424 }, |
| 425 | 425 |
| 426 /** | 426 /** |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 }, | 522 }, |
| 523 | 523 |
| 524 oncollapse: function() | 524 oncollapse: function() |
| 525 { | 525 { |
| 526 WebInspector.ObjectPropertyTreeElement.prototype.oncollapse.call(this); | 526 WebInspector.ObjectPropertyTreeElement.prototype.oncollapse.call(this); |
| 527 delete this.treeOutline.section._expandedProperties[this.propertyPath()]
; | 527 delete this.treeOutline.section._expandedProperties[this.propertyPath()]
; |
| 528 }, | 528 }, |
| 529 | 529 |
| 530 __proto__: WebInspector.ObjectPropertyTreeElement.prototype | 530 __proto__: WebInspector.ObjectPropertyTreeElement.prototype |
| 531 } | 531 } |
| OLD | NEW |