Chromium Code Reviews| Index: third_party/WebKit/Source/web/resources/suggestionPicker.js |
| diff --git a/third_party/WebKit/Source/web/resources/suggestionPicker.js b/third_party/WebKit/Source/web/resources/suggestionPicker.js |
| index da62067e4ae40589bfa0175f917c99a63ea4a3ed..b141de4eadde721441043972ef712acd80fff79d 100644 |
| --- a/third_party/WebKit/Source/web/resources/suggestionPicker.js |
| +++ b/third_party/WebKit/Source/web/resources/suggestionPicker.js |
| @@ -138,10 +138,10 @@ SuggestionPicker.prototype._measureMaxContentWidth = function() { |
| SuggestionPicker.prototype._fixWindowSize = function() { |
| var ListBorder = 2; |
| var zoom = this._config.zoomFactor; |
| - var desiredWindowWidth = this._measureMaxContentWidth() + ListBorder; |
| + var desiredWindowWidth = (this._measureMaxContentWidth() + ListBorder) * zoom; |
| if (typeof this._config.inputWidth === "number") |
| - desiredWindowWidth = Math.max(this._config.inputWidth / zoom, desiredWindowWidth); |
| - var totalHeight = ListBorder; |
| + desiredWindowWidth = Math.max(this._config.inputWidth, desiredWindowWidth); |
| + var totalHeight = ListBorder |
|
tkent
2015/12/09 04:35:51
Add ';' back.
oshima
2015/12/17 05:01:28
Done.
|
| var maxHeight = 0; |
| var entryCount = 0; |
| for (var i = 0; i < this._containerElement.childNodes.length; ++i) { |
| @@ -152,15 +152,14 @@ SuggestionPicker.prototype._fixWindowSize = function() { |
| if (maxHeight === 0 && entryCount == SuggestionPicker.NumberOfVisibleEntries) |
| maxHeight = totalHeight; |
| } |
| - var desiredWindowHeight = totalHeight; |
| - if (maxHeight !== 0 && totalHeight > maxHeight) { |
| + var desiredWindowHeight = totalHeight * zoom; |
| + if (maxHeight !== 0 && totalHeight > maxHeight * zoom) { |
| this._containerElement.style.maxHeight = (maxHeight - ListBorder) + "px"; |
| - desiredWindowWidth += getScrollbarWidth(); |
| - desiredWindowHeight = maxHeight; |
| + desiredWindowWidth += getScrollbarWidth() * zoom; |
| + desiredWindowHeight = maxHeight * zoom; |
| this._containerElement.style.overflowY = "scroll"; |
| } |
| - |
| - var windowRect = adjustWindowRect(desiredWindowWidth * zoom, desiredWindowHeight * zoom, desiredWindowWidth * zoom, 0); |
| + var windowRect = adjustWindowRect(desiredWindowWidth, desiredWindowHeight, desiredWindowWidth, 0); |
| this._containerElement.style.height = (windowRect.height / zoom - ListBorder) + "px"; |
| setWindowRect(windowRect); |
| }; |