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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 } | 113 } |
114 | 114 |
115 var subtitle = scope.description(); | 115 var subtitle = scope.description(); |
116 if (!title || title === subtitle) | 116 if (!title || title === subtitle) |
117 subtitle = undefined; | 117 subtitle = undefined; |
118 | 118 |
119 var titleElement = createElementWithClass("div", "scope-chain-sideba
r-pane-section-header"); | 119 var titleElement = createElementWithClass("div", "scope-chain-sideba
r-pane-section-header"); |
120 titleElement.createChild("div", "scope-chain-sidebar-pane-section-su
btitle").textContent = subtitle; | 120 titleElement.createChild("div", "scope-chain-sidebar-pane-section-su
btitle").textContent = subtitle; |
121 titleElement.createChild("div", "scope-chain-sidebar-pane-section-ti
tle").textContent = title; | 121 titleElement.createChild("div", "scope-chain-sidebar-pane-section-ti
tle").textContent = title; |
122 | 122 |
123 var section = new WebInspector.ObjectPropertiesSection(WebInspector.
SourceMapNamesResolver.resolveScopeInObject(scope), titleElement, emptyPlacehold
er, true, extraProperties); | 123 var section = new WebInspector.ObjectPropertiesSection(WebInspector.
SourceMapNamesResolver.resolveScopeInObject(scope), titleElement, null, emptyPla
ceholder, true, extraProperties); |
124 this._expandController.watchSection(title + (subtitle ? ":" + subtit
le : ""), section); | 124 this._expandController.watchSection(title + (subtitle ? ":" + subtit
le : ""), section); |
125 | 125 |
126 if (scope.type() === DebuggerAgent.ScopeType.Global) | 126 if (scope.type() === DebuggerAgent.ScopeType.Global) |
127 section.objectTreeElement().collapse(); | 127 section.objectTreeElement().collapse(); |
128 else if (!foundLocalScope || scope.type() === DebuggerAgent.ScopeTyp
e.Local) | 128 else if (!foundLocalScope || scope.type() === DebuggerAgent.ScopeTyp
e.Local) |
129 section.objectTreeElement().expand(); | 129 section.objectTreeElement().expand(); |
130 | 130 |
131 section.element.classList.add("scope-chain-sidebar-pane-section"); | 131 section.element.classList.add("scope-chain-sidebar-pane-section"); |
132 this.element.appendChild(section.element); | 132 this.element.appendChild(section.element); |
133 } | 133 } |
134 this._sidebarPaneUpdatedForTest(); | 134 this._sidebarPaneUpdatedForTest(); |
135 }, | 135 }, |
136 | 136 |
137 _sidebarPaneUpdatedForTest: function() { }, | 137 _sidebarPaneUpdatedForTest: function() { }, |
138 | 138 |
139 __proto__: WebInspector.SidebarPane.prototype | 139 __proto__: WebInspector.SidebarPane.prototype |
140 } | 140 } |
OLD | NEW |