Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: Source/devtools/front_end/SidebarPane.js

Issue 214663005: [DevTools] Add preferred size to WebInspector.View. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Constraints Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 15 matching lines...) Expand all
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 /** 29 /**
30 * @constructor 30 * @constructor
31 * @extends {WebInspector.View} 31 * @extends {WebInspector.View}
32 */ 32 */
33 WebInspector.SidebarPane = function(title) 33 WebInspector.SidebarPane = function(title)
34 { 34 {
35 WebInspector.View.call(this); 35 WebInspector.View.call(this);
36 this.setMinimumSize(25, 0); 36 this.setConstraints(25, 0);
37 this.element.className = "sidebar-pane"; // Override 37 this.element.className = "sidebar-pane"; // Override
38 38
39 this.titleElement = document.createElement("div"); 39 this.titleElement = document.createElement("div");
40 this.titleElement.className = "sidebar-pane-toolbar"; 40 this.titleElement.className = "sidebar-pane-toolbar";
41 41
42 this.bodyElement = this.element.createChild("div", "body"); 42 this.bodyElement = this.element.createChild("div", "body");
43 43
44 this._title = title; 44 this._title = title;
45 45
46 this._expandCallback = null; 46 this._expandCallback = null;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 } 155 }
156 156
157 /** 157 /**
158 * @constructor 158 * @constructor
159 * @extends {WebInspector.View} 159 * @extends {WebInspector.View}
160 */ 160 */
161 WebInspector.SidebarPaneStack = function() 161 WebInspector.SidebarPaneStack = function()
162 { 162 {
163 WebInspector.View.call(this); 163 WebInspector.View.call(this);
164 this.setMinimumSize(25, 0); 164 this.setConstraints(25, 0);
165 this.element.className = "sidebar-pane-stack"; // Override 165 this.element.className = "sidebar-pane-stack"; // Override
166 this.registerRequiredCSS("sidebarPane.css"); 166 this.registerRequiredCSS("sidebarPane.css");
167 } 167 }
168 168
169 WebInspector.SidebarPaneStack.prototype = { 169 WebInspector.SidebarPaneStack.prototype = {
170 /** 170 /**
171 * @param {!WebInspector.SidebarPane} pane 171 * @param {!WebInspector.SidebarPane} pane
172 */ 172 */
173 addPane: function(pane) 173 addPane: function(pane)
174 { 174 {
(...skipping 23 matching lines...) Expand all
198 { 198 {
199 var title = pane.title(); 199 var title = pane.title();
200 this.appendTab(title, title, pane); 200 this.appendTab(title, title, pane);
201 pane.element.appendChild(pane.titleElement); 201 pane.element.appendChild(pane.titleElement);
202 pane.setExpandCallback(this.selectTab.bind(this, title)); 202 pane.setExpandCallback(this.selectTab.bind(this, title));
203 203
204 }, 204 },
205 205
206 __proto__: WebInspector.TabbedPane.prototype 206 __proto__: WebInspector.TabbedPane.prototype
207 } 207 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698