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

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

Issue 1454613002: Page popups should respect zoom factor of the anchor element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add 1.25 zoom tests Created 5 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/web/resources/pickerCommon.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7db37d1b532f0ce910be51f60d1bc1b2916cf3d0..da62067e4ae40589bfa0175f917c99a63ea4a3ed 100644
--- a/third_party/WebKit/Source/web/resources/suggestionPicker.js
+++ b/third_party/WebKit/Source/web/resources/suggestionPicker.js
@@ -137,9 +137,10 @@ SuggestionPicker.prototype._measureMaxContentWidth = function() {
SuggestionPicker.prototype._fixWindowSize = function() {
var ListBorder = 2;
+ var zoom = this._config.zoomFactor;
var desiredWindowWidth = this._measureMaxContentWidth() + ListBorder;
if (typeof this._config.inputWidth === "number")
- desiredWindowWidth = Math.max(this._config.inputWidth, desiredWindowWidth);
+ desiredWindowWidth = Math.max(this._config.inputWidth / zoom, desiredWindowWidth);
var totalHeight = ListBorder;
var maxHeight = 0;
var entryCount = 0;
@@ -159,8 +160,8 @@ SuggestionPicker.prototype._fixWindowSize = function() {
this._containerElement.style.overflowY = "scroll";
}
- var windowRect = adjustWindowRect(desiredWindowWidth, desiredWindowHeight, desiredWindowWidth, 0);
- this._containerElement.style.height = (windowRect.height - ListBorder) + "px";
+ var windowRect = adjustWindowRect(desiredWindowWidth * zoom, desiredWindowHeight * zoom, desiredWindowWidth * zoom, 0);
+ this._containerElement.style.height = (windowRect.height / zoom - ListBorder) + "px";
setWindowRect(windowRect);
};
« no previous file with comments | « third_party/WebKit/Source/web/resources/pickerCommon.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698