| 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 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 | 828 |
| 829 // Lie about our children to prevent expanding on double click and to collap
se subproperties. | 829 // Lie about our children to prevent expanding on double click and to collap
se subproperties. |
| 830 this.setExpandable(false); | 830 this.setExpandable(false); |
| 831 this.listItemElement.classList.add('editing-sub-part'); | 831 this.listItemElement.classList.add('editing-sub-part'); |
| 832 this.valueElement.classList.add('hidden'); | 832 this.valueElement.classList.add('hidden'); |
| 833 | 833 |
| 834 this._prompt = new Components.ObjectPropertyPrompt(); | 834 this._prompt = new Components.ObjectPropertyPrompt(); |
| 835 | 835 |
| 836 var proxyElement = | 836 var proxyElement = |
| 837 this._prompt.attachAndStartEditing(this._editableDiv, this._editingCommi
tted.bind(this, originalContent)); | 837 this._prompt.attachAndStartEditing(this._editableDiv, this._editingCommi
tted.bind(this, originalContent)); |
| 838 this.listItemElement.getComponentSelection().setBaseAndExtent(this._editable
Div, 0, this._editableDiv, 1); | 838 this.listItemElement.getComponentSelection().selectAllChildren(this._editabl
eDiv); |
| 839 proxyElement.addEventListener('keydown', this._promptKeyDown.bind(this, orig
inalContent), false); | 839 proxyElement.addEventListener('keydown', this._promptKeyDown.bind(this, orig
inalContent), false); |
| 840 } | 840 } |
| 841 | 841 |
| 842 _editingEnded() { | 842 _editingEnded() { |
| 843 this._prompt.detach(); | 843 this._prompt.detach(); |
| 844 delete this._prompt; | 844 delete this._prompt; |
| 845 this._editableDiv.remove(); | 845 this._editableDiv.remove(); |
| 846 this._updateExpandable(); | 846 this._updateExpandable(); |
| 847 this.listItemElement.scrollLeft = 0; | 847 this.listItemElement.scrollLeft = 0; |
| 848 this.listItemElement.classList.remove('editing-sub-part'); | 848 this.listItemElement.classList.remove('editing-sub-part'); |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 } | 1345 } |
| 1346 var treeOutlineId = treeElement.treeOutline[Components.ObjectPropertiesSecti
onExpandController._treeOutlineId]; | 1346 var treeOutlineId = treeElement.treeOutline[Components.ObjectPropertiesSecti
onExpandController._treeOutlineId]; |
| 1347 result = treeOutlineId + (result ? ':' + result : ''); | 1347 result = treeOutlineId + (result ? ':' + result : ''); |
| 1348 treeElement[Components.ObjectPropertiesSectionExpandController._cachedPathSy
mbol] = result; | 1348 treeElement[Components.ObjectPropertiesSectionExpandController._cachedPathSy
mbol] = result; |
| 1349 return result; | 1349 return result; |
| 1350 } | 1350 } |
| 1351 }; | 1351 }; |
| 1352 | 1352 |
| 1353 Components.ObjectPropertiesSectionExpandController._cachedPathSymbol = Symbol('c
achedPath'); | 1353 Components.ObjectPropertiesSectionExpandController._cachedPathSymbol = Symbol('c
achedPath'); |
| 1354 Components.ObjectPropertiesSectionExpandController._treeOutlineId = Symbol('tree
OutlineId'); | 1354 Components.ObjectPropertiesSectionExpandController._treeOutlineId = Symbol('tree
OutlineId'); |
| OLD | NEW |