| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 * @extends {TreeOutlineInShadow} | 29 * @extends {TreeOutlineInShadow} |
| 30 * @param {!WebInspector.RemoteObject} object | 30 * @param {!WebInspector.RemoteObject} object |
| 31 * @param {?string|!Element=} title | 31 * @param {?string|!Element=} title |
| 32 * @param {!WebInspector.Linkifier=} linkifier | 32 * @param {!WebInspector.Linkifier=} linkifier |
| 33 * @param {?string=} emptyPlaceholder | 33 * @param {?string=} emptyPlaceholder |
| 34 * @param {boolean=} ignoreHasOwnProperty | 34 * @param {boolean=} ignoreHasOwnProperty |
| 35 * @param {!Array.<!WebInspector.RemoteObjectProperty>=} extraProperties | 35 * @param {!Array.<!WebInspector.RemoteObjectProperty>=} extraProperties |
| 36 */ | 36 */ |
| 37 WebInspector.ObjectPropertiesSection = function(object, title, linkifier, emptyP
laceholder, ignoreHasOwnProperty, extraProperties) | 37 WebInspector.ObjectPropertiesSection = function(object, title, linkifier, emptyP
laceholder, ignoreHasOwnProperty, extraProperties) |
| 38 { | 38 { |
| 39 TreeOutlineInShadow.call(this); |
| 39 this._object = object; | 40 this._object = object; |
| 40 this._editable = true; | 41 this._editable = true; |
| 41 TreeOutlineInShadow.call(this); | |
| 42 this.hideOverflow(); | 42 this.hideOverflow(); |
| 43 this.setFocusable(false); | 43 this.setFocusable(false); |
| 44 this._objectTreeElement = new WebInspector.ObjectPropertiesSection.RootEleme
nt(object, linkifier, emptyPlaceholder, ignoreHasOwnProperty, extraProperties); | 44 this._objectTreeElement = new WebInspector.ObjectPropertiesSection.RootEleme
nt(object, linkifier, emptyPlaceholder, ignoreHasOwnProperty, extraProperties); |
| 45 this.appendChild(this._objectTreeElement); | 45 this.appendChild(this._objectTreeElement); |
| 46 if (typeof title === "string" || !title) { | 46 if (typeof title === "string" || !title) { |
| 47 this.titleElement = this.element.createChild("span"); | 47 this.titleElement = this.element.createChild("span"); |
| 48 this.titleElement.textContent = title || ""; | 48 this.titleElement.textContent = title || ""; |
| 49 } else { | 49 } else { |
| 50 this.titleElement = title; | 50 this.titleElement = title; |
| 51 this.element.appendChild(title); | 51 this.element.appendChild(title); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 * @constructor | 164 * @constructor |
| 165 * @extends {TreeElement} | 165 * @extends {TreeElement} |
| 166 * @param {!WebInspector.RemoteObject} object | 166 * @param {!WebInspector.RemoteObject} object |
| 167 * @param {!WebInspector.Linkifier=} linkifier | 167 * @param {!WebInspector.Linkifier=} linkifier |
| 168 * @param {?string=} emptyPlaceholder | 168 * @param {?string=} emptyPlaceholder |
| 169 * @param {boolean=} ignoreHasOwnProperty | 169 * @param {boolean=} ignoreHasOwnProperty |
| 170 * @param {!Array.<!WebInspector.RemoteObjectProperty>=} extraProperties | 170 * @param {!Array.<!WebInspector.RemoteObjectProperty>=} extraProperties |
| 171 */ | 171 */ |
| 172 WebInspector.ObjectPropertiesSection.RootElement = function(object, linkifier, e
mptyPlaceholder, ignoreHasOwnProperty, extraProperties) | 172 WebInspector.ObjectPropertiesSection.RootElement = function(object, linkifier, e
mptyPlaceholder, ignoreHasOwnProperty, extraProperties) |
| 173 { | 173 { |
| 174 var contentElement = createElement("content"); |
| 175 TreeElement.call(this, contentElement); |
| 176 |
| 174 this._object = object; | 177 this._object = object; |
| 175 this._extraProperties = extraProperties || []; | 178 this._extraProperties = extraProperties || []; |
| 176 this._ignoreHasOwnProperty = !!ignoreHasOwnProperty; | 179 this._ignoreHasOwnProperty = !!ignoreHasOwnProperty; |
| 177 this._emptyPlaceholder = emptyPlaceholder; | 180 this._emptyPlaceholder = emptyPlaceholder; |
| 178 var contentElement = createElement("content"); | 181 |
| 179 TreeElement.call(this, contentElement); | |
| 180 this.setExpandable(true); | 182 this.setExpandable(true); |
| 181 this.selectable = false; | 183 this.selectable = false; |
| 182 this.toggleOnClick = true; | 184 this.toggleOnClick = true; |
| 183 this.listItemElement.classList.add("object-properties-section-root-element")
; | 185 this.listItemElement.classList.add("object-properties-section-root-element")
; |
| 184 this._linkifier = linkifier; | 186 this._linkifier = linkifier; |
| 185 }; | 187 }; |
| 186 | 188 |
| 187 WebInspector.ObjectPropertiesSection.RootElement.prototype = { | 189 WebInspector.ObjectPropertiesSection.RootElement.prototype = { |
| 188 /** | 190 /** |
| 189 * @override | 191 * @override |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 }; | 241 }; |
| 240 | 242 |
| 241 /** | 243 /** |
| 242 * @constructor | 244 * @constructor |
| 243 * @extends {TreeElement} | 245 * @extends {TreeElement} |
| 244 * @param {!WebInspector.RemoteObjectProperty} property | 246 * @param {!WebInspector.RemoteObjectProperty} property |
| 245 * @param {!WebInspector.Linkifier=} linkifier | 247 * @param {!WebInspector.Linkifier=} linkifier |
| 246 */ | 248 */ |
| 247 WebInspector.ObjectPropertyTreeElement = function(property, linkifier) | 249 WebInspector.ObjectPropertyTreeElement = function(property, linkifier) |
| 248 { | 250 { |
| 249 this.property = property; | |
| 250 | |
| 251 // Pass an empty title, the title gets made later in onattach. | 251 // Pass an empty title, the title gets made later in onattach. |
| 252 TreeElement.call(this); | 252 TreeElement.call(this); |
| 253 |
| 254 this.property = property; |
| 253 this.toggleOnClick = true; | 255 this.toggleOnClick = true; |
| 254 this.selectable = false; | 256 this.selectable = false; |
| 255 /** @type {!Array.<!Object>} */ | 257 /** @type {!Array.<!Object>} */ |
| 256 this._highlightChanges = []; | 258 this._highlightChanges = []; |
| 257 this._linkifier = linkifier; | 259 this._linkifier = linkifier; |
| 258 }; | 260 }; |
| 259 | 261 |
| 260 WebInspector.ObjectPropertyTreeElement.prototype = { | 262 WebInspector.ObjectPropertyTreeElement.prototype = { |
| 261 /** | 263 /** |
| 262 * @param {!RegExp} regex | 264 * @param {!RegExp} regex |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 | 1028 |
| 1027 __proto__: TreeElement.prototype | 1029 __proto__: TreeElement.prototype |
| 1028 }; | 1030 }; |
| 1029 | 1031 |
| 1030 /** | 1032 /** |
| 1031 * @constructor | 1033 * @constructor |
| 1032 * @extends {WebInspector.TextPrompt} | 1034 * @extends {WebInspector.TextPrompt} |
| 1033 */ | 1035 */ |
| 1034 WebInspector.ObjectPropertyPrompt = function() | 1036 WebInspector.ObjectPropertyPrompt = function() |
| 1035 { | 1037 { |
| 1036 WebInspector.TextPrompt.call(this, WebInspector.ExecutionContextSelector.com
pletionsForTextPromptInCurrentContext); | 1038 WebInspector.TextPrompt.call(this); |
| 1039 this.initialize(WebInspector.ExecutionContextSelector.completionsForTextProm
ptInCurrentContext); |
| 1037 this.setSuggestBoxEnabled(true); | 1040 this.setSuggestBoxEnabled(true); |
| 1038 }; | 1041 }; |
| 1039 | 1042 |
| 1040 WebInspector.ObjectPropertyPrompt.prototype = { | 1043 WebInspector.ObjectPropertyPrompt.prototype = { |
| 1041 __proto__: WebInspector.TextPrompt.prototype | 1044 __proto__: WebInspector.TextPrompt.prototype |
| 1042 }; | 1045 }; |
| 1043 | 1046 |
| 1044 /** | 1047 /** |
| 1045 * @param {?string} name | 1048 * @param {?string} name |
| 1046 * @return {!Element} | 1049 * @return {!Element} |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 | 1367 |
| 1365 result = currentName + (result ? "." + result : ""); | 1368 result = currentName + (result ? "." + result : ""); |
| 1366 current = current.parent; | 1369 current = current.parent; |
| 1367 } | 1370 } |
| 1368 var treeOutlineId = treeElement.treeOutline[WebInspector.ObjectPropertie
sSectionExpandController._treeOutlineId]; | 1371 var treeOutlineId = treeElement.treeOutline[WebInspector.ObjectPropertie
sSectionExpandController._treeOutlineId]; |
| 1369 result = treeOutlineId + (result ? ":" + result : ""); | 1372 result = treeOutlineId + (result ? ":" + result : ""); |
| 1370 treeElement[WebInspector.ObjectPropertiesSectionExpandController._cached
PathSymbol] = result; | 1373 treeElement[WebInspector.ObjectPropertiesSectionExpandController._cached
PathSymbol] = result; |
| 1371 return result; | 1374 return result; |
| 1372 } | 1375 } |
| 1373 }; | 1376 }; |
| OLD | NEW |