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

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

Issue 2605253002: [DevTools] Add grow mode to ListControl. (Closed)
Patch Set: addressed review comments Created 4 years 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/SuggestBox.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js b/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js
index 2492af997336363ffa703874f4cb32294c14892a..ee250df8b0e4faeb94720ac5bec2f6d2f193eb44 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js
@@ -62,7 +62,7 @@ UI.SuggestBox = class {
this._container = createElementWithClass('div', 'suggest-box-container');
this._rowHeight = 17;
/** @type {!UI.ListControl<!UI.SuggestBox.Suggestion>} */
- this._list = new UI.ListControl(this);
+ this._list = new UI.ListControl(this, UI.ListMode.ViewportFixedItems);
this._element = this._list.element;
this._element.classList.add('suggest-box');
this._container.appendChild(this._element);
@@ -385,8 +385,7 @@ UI.SuggestBox = class {
this._show();
this._updateBoxPosition(anchorBox, completions.length);
this._updateWidth(completions);
-
- this._list.setHeightMode(UI.ListHeightMode.Fixed);
+ this._list.fixedHeightChanged();
this._list.replaceAllItems(completions);
var highestPriorityItem = -1;

Powered by Google App Engine
This is Rietveld 408576698