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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js

Issue 2680543003: DevTools: Show scrollbars on a small FilteredListWidget (Closed)
Patch Set: Created 3 years, 10 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: third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js b/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
index 835b6afc3c4794b5d3f3c9724be1de7bc96fc4e4..4932f117ef7afd0ce88d1e06151615bce54d57a2 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js
@@ -31,6 +31,7 @@ UI.GlassPane = class {
/** @type {?AnchorBox} */
this._anchorBox = null;
this._anchorBehavior = UI.GlassPane.AnchorBehavior.PreferTop;
+ this._fixedHeight = true;
}
/**
@@ -42,6 +43,13 @@ UI.GlassPane = class {
}
/**
+ * @param {boolean} fixedHeight
+ */
+ setFixedHeight(fixedHeight) {
+ this._fixedHeight = fixedHeight;
+ }
+
+ /**
* @param {?number} x
* @param {?number} y
* Position is relative to root element.
@@ -161,7 +169,10 @@ UI.GlassPane = class {
}
this.contentElement.style.width = width + 'px';
- this.contentElement.style.height = height + 'px';
+ if (this._fixedHeight)
+ this.contentElement.style.height = height + 'px';
+ else
+ this.contentElement.style.maxHeight = height + 'px';
this.contentElement.positionAt(positionX, positionY, container);
}

Powered by Google App Engine
This is Rietveld 408576698