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

Unified Diff: Source/devtools/front_end/TabbedPane.js

Issue 214663005: [DevTools] Add preferred size to WebInspector.View. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: saved main size 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 side-by-side diff with in-line comments
Download patch
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..f8716afc99852607349a02a1102877703d8a5303 100644
--- a/Source/devtools/front_end/TabbedPane.js
+++ b/Source/devtools/front_end/TabbedPane.js
@@ -385,10 +385,12 @@ WebInspector.TabbedPane.prototype = {
calculateMinimumSize: function()
{
var size = WebInspector.VBox.prototype.calculateMinimumSize.call(this);
+ var minContentSize = new Size(0, 0, 50, 50);
+ size = size.widthToMax(minContentSize).heightToMax(minContentSize);
if (this._verticalTabLayout)
- size.width += this._headerElement.offsetWidth;
+ size = size.addWidth(new Size(this._headerElement.offsetWidth, 0));
else
- size.height += this._headerElement.offsetHeight;
+ size = size.addHeight(new Size(0, this._headerElement.offsetHeight));
return size;
},

Powered by Google App Engine
This is Rietveld 408576698