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 95 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-sideba
r-pane-section-header"); | 112 var titleElement = createElementWithClass("div", "scope-chain-sideba
r-pane-section-header"); |
113 titleElement.createChild("div", "scope-chain-sidebar-pane-section-su
btitle").textContent = subtitle; | 113 titleElement.createChild("div", "scope-chain-sidebar-pane-section-su
btitle").textContent = subtitle; |
114 titleElement.createChild("div", "scope-chain-sidebar-pane-section-ti
tle").textContent = title; | 114 titleElement.createChild("div", "scope-chain-sidebar-pane-section-ti
tle").textContent = title; |
115 | 115 |
116 var section = new WebInspector.ObjectPropertiesSection(scope.object(
), titleElement, emptyPlaceholder, true, extraProperties); | 116 var section = new WebInspector.ObjectPropertiesSection(WebInspector.
SourceMapNamesResolver.resolveScopeInObject(scope), titleElement, emptyPlacehold
er, true, extraProperties); |
117 this._expandController.watchSection(title + (subtitle ? ":" + subtit
le : ""), section); | 117 this._expandController.watchSection(title + (subtitle ? ":" + subtit
le : ""), section); |
118 | 118 |
119 if (scope.type() === DebuggerAgent.ScopeType.Global) | 119 if (scope.type() === DebuggerAgent.ScopeType.Global) |
120 section.objectTreeElement().collapse(); | 120 section.objectTreeElement().collapse(); |
121 else if (!foundLocalScope || scope.type() === DebuggerAgent.ScopeTyp
e.Local) | 121 else if (!foundLocalScope || scope.type() === DebuggerAgent.ScopeTyp
e.Local) |
122 section.objectTreeElement().expand(); | 122 section.objectTreeElement().expand(); |
123 | 123 |
124 section.element.classList.add("scope-chain-sidebar-pane-section"); | 124 section.element.classList.add("scope-chain-sidebar-pane-section"); |
125 this.element.appendChild(section.element); | 125 this.element.appendChild(section.element); |
126 } | 126 } |
127 }, | 127 }, |
128 | 128 |
129 __proto__: WebInspector.SidebarPane.prototype | 129 __proto__: WebInspector.SidebarPane.prototype |
130 } | 130 } |
OLD | NEW |