| 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) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 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 12 matching lines...) Expand all Loading... |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 /** | 26 /** |
| 27 * @implements {UI.ContextFlavorListener} | 27 * @implements {UI.ContextFlavorListener} |
| 28 * @unrestricted | 28 * @unrestricted |
| 29 */ | 29 */ |
| 30 Sources.ScopeChainSidebarPane = class extends UI.VBox { | 30 Sources.ScopeChainSidebarPane = class extends UI.VBox { |
| 31 constructor() { | 31 constructor() { |
| 32 super(); | 32 super(); |
| 33 this._expandController = new Components.ObjectPropertiesSectionExpandControl
ler(); | 33 this._expandController = new ObjectUI.ObjectPropertiesSectionExpandControlle
r(); |
| 34 this._linkifier = new Components.Linkifier(); | 34 this._linkifier = new Components.Linkifier(); |
| 35 this._update(); | 35 this._update(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * @override | 39 * @override |
| 40 * @param {?Object} object | 40 * @param {?Object} object |
| 41 */ | 41 */ |
| 42 flavorChanged(object) { | 42 flavorChanged(object) { |
| 43 this._update(); | 43 this._update(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 } | 106 } |
| 107 | 107 |
| 108 var subtitle = scope.description(); | 108 var subtitle = scope.description(); |
| 109 if (!title || title === subtitle) | 109 if (!title || title === subtitle) |
| 110 subtitle = undefined; | 110 subtitle = undefined; |
| 111 | 111 |
| 112 var titleElement = createElementWithClass('div', 'scope-chain-sidebar-pane
-section-header'); | 112 var titleElement = createElementWithClass('div', 'scope-chain-sidebar-pane
-section-header'); |
| 113 titleElement.createChild('div', 'scope-chain-sidebar-pane-section-subtitle
').textContent = subtitle; | 113 titleElement.createChild('div', 'scope-chain-sidebar-pane-section-subtitle
').textContent = subtitle; |
| 114 titleElement.createChild('div', 'scope-chain-sidebar-pane-section-title').
textContent = title; | 114 titleElement.createChild('div', 'scope-chain-sidebar-pane-section-title').
textContent = title; |
| 115 | 115 |
| 116 var section = new Components.ObjectPropertiesSection( | 116 var section = new ObjectUI.ObjectPropertiesSection( |
| 117 Sources.SourceMapNamesResolver.resolveScopeInObject(scope), titleEleme
nt, this._linkifier, emptyPlaceholder, | 117 Sources.SourceMapNamesResolver.resolveScopeInObject(scope), titleEleme
nt, this._linkifier, emptyPlaceholder, |
| 118 true, extraProperties); | 118 true, extraProperties); |
| 119 this._expandController.watchSection(title + (subtitle ? ':' + subtitle : '
'), section); | 119 this._expandController.watchSection(title + (subtitle ? ':' + subtitle : '
'), section); |
| 120 | 120 |
| 121 if (scope.type() === Protocol.Debugger.ScopeType.Global) | 121 if (scope.type() === Protocol.Debugger.ScopeType.Global) |
| 122 section.objectTreeElement().collapse(); | 122 section.objectTreeElement().collapse(); |
| 123 else if (!foundLocalScope || scope.type() === Protocol.Debugger.ScopeType.
Local) | 123 else if (!foundLocalScope || scope.type() === Protocol.Debugger.ScopeType.
Local) |
| 124 section.objectTreeElement().expand(); | 124 section.objectTreeElement().expand(); |
| 125 | 125 |
| 126 section.element.classList.add('scope-chain-sidebar-pane-section'); | 126 section.element.classList.add('scope-chain-sidebar-pane-section'); |
| 127 this.element.appendChild(section.element); | 127 this.element.appendChild(section.element); |
| 128 } | 128 } |
| 129 this._sidebarPaneUpdatedForTest(); | 129 this._sidebarPaneUpdatedForTest(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 _sidebarPaneUpdatedForTest() { | 132 _sidebarPaneUpdatedForTest() { |
| 133 } | 133 } |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 Sources.ScopeChainSidebarPane._pathSymbol = Symbol('path'); | 136 Sources.ScopeChainSidebarPane._pathSymbol = Symbol('path'); |
| OLD | NEW |