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

Unified Diff: third_party/WebKit/Source/web/resources/listPicker.js

Issue 1980103002: Include auto vertical scrollbar in intrinsicScrollbarLogicalWidth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 7 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/web/resources/listPicker.js
diff --git a/third_party/WebKit/Source/web/resources/listPicker.js b/third_party/WebKit/Source/web/resources/listPicker.js
index 0e25f1ce4329b65262136c01622f26a96dad4ad2..ad4cefcfca728de88138cfed379ce4ce4f4f0230 100644
--- a/third_party/WebKit/Source/web/resources/listPicker.js
+++ b/third_party/WebKit/Source/web/resources/listPicker.js
@@ -221,23 +221,19 @@ ListPicker.prototype._fixWindowSize = function() {
var zoom = this._config.zoomFactor;
var maxHeight = this._selectElement.offsetHeight * zoom;
var noScrollHeight = (this._calculateScrollHeight() + ListPicker.ListboxSelectBorder * 2) * zoom;
- var scrollbarWidth = getScrollbarWidth() * zoom;
var elementOffsetWidth = this._selectElement.offsetWidth * zoom;
var desiredWindowHeight = noScrollHeight;
var desiredWindowWidth = elementOffsetWidth;
var expectingScrollbar = false;
if (desiredWindowHeight > maxHeight) {
desiredWindowHeight = maxHeight;
- // Setting overflow to auto does not increase width for the scrollbar
- // so we need to do it manually.
- desiredWindowWidth += scrollbarWidth;
expectingScrollbar = true;
}
desiredWindowWidth = Math.max(this._config.anchorRectInScreen.width, desiredWindowWidth);
var windowRect = adjustWindowRect(desiredWindowWidth, desiredWindowHeight, elementOffsetWidth, 0);
// If the available screen space is smaller than maxHeight, we will get an unexpected scrollbar.
if (!expectingScrollbar && windowRect.height < noScrollHeight) {
- desiredWindowWidth = windowRect.width + scrollbarWidth;
+ desiredWindowWidth = windowRect.width;
windowRect = adjustWindowRect(desiredWindowWidth, windowRect.height, windowRect.width, windowRect.height);
}
this._selectElement.style.width = (windowRect.width / zoom) + "px";

Powered by Google App Engine
This is Rietveld 408576698