Commit fb6bf69e authored by Miriam Zimmerman's avatar Miriam Zimmerman Committed by Commit Bot

feedback: Don't use deprecated resizeTo method.

The resizeTo function is deprecated, and it set the height of the
overall window -- including window chrome. On mac, there are 20px or so
of chrome at the top of the window. This resulted in the window being
too short.

See https://developer.chrome.com/apps/app_window#type-AppWindow

TEST=on my personal mac, edit html of feedback page to contain an extra\
     line, then edit feedback JS to match this CL and run \
     resizeAppWindow(). Verify window size is correct.

Fixed: 2461725
Change-Id: I0d75d9e07d25e2a93a9c3fa17c7dbb98913724dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2508974
Commit-Queue: Miriam Zimmerman <mutexlox@chromium.org>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: default avatarIan Barkley-Yeung <iby@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822917}
parent 3e31ebb7
......@@ -25,11 +25,6 @@ const FEEDBACK_MIN_HEIGHT = 585;
*/
const FEEDBACK_MIN_HEIGHT_LOGIN = 482;
/** @type {number}
* @const
*/
const CONTENT_MARGIN_HEIGHT = 40;
/** @type {number}
* @const
*/
......@@ -346,7 +341,8 @@ function resizeAppWindow() {
}
height = Math.max(height, minHeight);
chrome.app.window.current().resizeTo(width, height);
chrome.app.window.current().innerBounds.width = width;
chrome.app.window.current().innerBounds.height = height;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment