diff options
author | Andy Huang <ath@google.com> | 2014-02-10 15:43:14 -0800 |
---|---|---|
committer | Andy Huang <ath@google.com> | 2014-02-10 16:12:30 -0800 |
commit | 2160d53e6ae0bfb797569d616e735e46c21522ff (patch) | |
tree | e37dcc56e97a25e9d137eb51d8bbf3d886d66a78 /assets | |
parent | 88a377f5c4db683d949233bf8100153953b6be43 (diff) | |
download | android_packages_apps_UnifiedEmail-2160d53e6ae0bfb797569d616e735e46c21522ff.tar.gz android_packages_apps_UnifiedEmail-2160d53e6ae0bfb797569d616e735e46c21522ff.tar.bz2 android_packages_apps_UnifiedEmail-2160d53e6ae0bfb797569d616e735e46c21522ff.zip |
fix text sizing inaccuracy from 980px switch
The side margin was in CSS px, but goalWidth was in dp. This caused the
goalWidth to be smaller than it should, which caused scrollWidth to be
smaller, which caused each message's zoom factor to be larger, which
caused text to be larger than it used to be.
Now. goalWidth and documentWidth both have body margins accounted for in
the proper units.
Bug: 12579959
Change-Id: Ice36b48f381cf3171b092ba27152aa56b64f4100
Diffstat (limited to 'assets')
-rw-r--r-- | assets/script.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/assets/script.js b/assets/script.js index b8bd62cfa..17086823b 100644 --- a/assets/script.js +++ b/assets/script.js @@ -182,7 +182,7 @@ function normalizeElementWidths(elements) { var outerDiv; documentWidth = document.body.offsetWidth; - goalWidth = WEBVIEW_WIDTH - DOC_SIDE_MARGIN * 2; + goalWidth = WEBVIEW_WIDTH; for (i = 0; i < elements.length; i++) { el = elements[i]; @@ -193,7 +193,6 @@ function normalizeElementWidths(elements) { } origWidth = el.style.width; el.style.width = goalWidth + "px"; - newZoom = documentWidth / el.scrollWidth; transformContent(el, goalWidth, el.scrollWidth); newZoom = documentWidth / el.scrollWidth; if (NORMALIZE_MESSAGE_WIDTHS) { |