OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 this.selectTab(effectiveTab.id); | 378 this.selectTab(effectiveTab.id); |
379 this.invalidateMinimumSize(); | 379 this.invalidateMinimumSize(); |
380 }, | 380 }, |
381 | 381 |
382 /** | 382 /** |
383 * @return {!Size} | 383 * @return {!Size} |
384 */ | 384 */ |
385 calculateMinimumSize: function() | 385 calculateMinimumSize: function() |
386 { | 386 { |
387 var size = WebInspector.VBox.prototype.calculateMinimumSize.call(this); | 387 var size = WebInspector.VBox.prototype.calculateMinimumSize.call(this); |
| 388 var minContentSize = new Size(0, 0, 50, 50); |
| 389 size = size.widthToMax(minContentSize).heightToMax(minContentSize); |
388 if (this._verticalTabLayout) | 390 if (this._verticalTabLayout) |
389 size.width += this._headerElement.offsetWidth; | 391 size = size.addWidth(new Size(this._headerElement.offsetWidth, 0)); |
390 else | 392 else |
391 size.height += this._headerElement.offsetHeight; | 393 size = size.addHeight(new Size(0, this._headerElement.offsetHeight))
; |
392 return size; | 394 return size; |
393 }, | 395 }, |
394 | 396 |
395 _updateTabElements: function() | 397 _updateTabElements: function() |
396 { | 398 { |
397 WebInspector.invokeOnceAfterBatchUpdate(this, this._innerUpdateTabElemen
ts); | 399 WebInspector.invokeOnceAfterBatchUpdate(this, this._innerUpdateTabElemen
ts); |
398 }, | 400 }, |
399 | 401 |
400 /** | 402 /** |
401 * @param {string} text | 403 * @param {string} text |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 { | 1130 { |
1129 if (this._views.contains(id)) | 1131 if (this._views.contains(id)) |
1130 return /** @type {!WebInspector.View} */ (this._views.get(id)); | 1132 return /** @type {!WebInspector.View} */ (this._views.get(id)); |
1131 var view = this._extensions[id] ? /** @type {!WebInspector.View} */ (thi
s._extensions[id].instance()) : null; | 1133 var view = this._extensions[id] ? /** @type {!WebInspector.View} */ (thi
s._extensions[id].instance()) : null; |
1132 this._views.put(id, view); | 1134 this._views.put(id, view); |
1133 if (this._viewCallback && view) | 1135 if (this._viewCallback && view) |
1134 this._viewCallback(id, view); | 1136 this._viewCallback(id, view); |
1135 return view; | 1137 return view; |
1136 } | 1138 } |
1137 } | 1139 } |
OLD | NEW |