Index: Source/devtools/front_end/TabbedPane.js |
diff --git a/Source/devtools/front_end/TabbedPane.js b/Source/devtools/front_end/TabbedPane.js |
index 3a93bafe529048e3a3e2339f608ae8336149291b..5d344f106ad837495a909f1493aec62e04796378 100644 |
--- a/Source/devtools/front_end/TabbedPane.js |
+++ b/Source/devtools/front_end/TabbedPane.js |
@@ -83,7 +83,7 @@ WebInspector.TabbedPane.prototype = { |
set verticalTabLayout(verticalTabLayout) |
{ |
this._verticalTabLayout = verticalTabLayout; |
- this.invalidateMinimumSize(); |
+ this.invalidateConstraints(); |
}, |
/** |
@@ -376,20 +376,22 @@ WebInspector.TabbedPane.prototype = { |
var effectiveTab = this._currentTab || this._tabsHistory[0]; |
if (effectiveTab) |
this.selectTab(effectiveTab.id); |
- this.invalidateMinimumSize(); |
+ this.invalidateConstraints(); |
}, |
/** |
- * @return {!Size} |
+ * @return {!Constraints} |
*/ |
- calculateMinimumSize: function() |
+ calculateConstraints: function() |
{ |
- var size = WebInspector.VBox.prototype.calculateMinimumSize.call(this); |
+ var constraints = WebInspector.VBox.prototype.calculateConstraints.call(this); |
+ var minContentConstraints = new Constraints(new Size(0, 0), new Size(50, 50)); |
+ constraints = constraints.widthToMax(minContentConstraints).heightToMax(minContentConstraints); |
if (this._verticalTabLayout) |
- size.width += this._headerElement.offsetWidth; |
+ constraints = constraints.addWidth(new Constraints(new Size(this._headerElement.offsetWidth, 0))); |
else |
- size.height += this._headerElement.offsetHeight; |
- return size; |
+ constraints = constraints.addHeight(new Constraints(new Size(0, this._headerElement.offsetHeight))); |
+ return constraints; |
}, |
_updateTabElements: function() |