summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMangesh Ghiware <mghiware@google.com>2012-01-09 16:02:21 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-09 16:02:21 -0800
commit2ddb4c85093384f55d74a58a8bc0b7ebf6b6b265 (patch)
tree0998acd5c48ec8603abec5d2e2bbb9be0a98fb20
parentf6a2ae37191b77881971003461a1e00aaa83a88a (diff)
parent6f2db8e75579ab562a8f97ec851198b404e336e8 (diff)
downloadframeworks_base-2ddb4c85093384f55d74a58a8bc0b7ebf6b6b265.zip
frameworks_base-2ddb4c85093384f55d74a58a8bc0b7ebf6b6b265.tar.gz
frameworks_base-2ddb4c85093384f55d74a58a8bc0b7ebf6b6b265.tar.bz2
Merge "Fix issue with site-specific display density getting stuck."
-rw-r--r--core/java/android/webkit/WebViewCore.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 70b92b2..95533c6 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -2396,11 +2396,7 @@ public final class WebViewCore {
// adjust the default scale to match the densityDpi
float adjust = 1.0f;
if (mViewportDensityDpi == -1) {
- // convert default zoom scale to a integer (percentage) to avoid any
- // issues with floating point comparisons
- if (mWebView != null && (int)(mWebView.getDefaultZoomScale() * 100) != 100) {
- adjust = mWebView.getDefaultZoomScale();
- }
+ adjust = mContext.getResources().getDisplayMetrics().density;
} else if (mViewportDensityDpi > 0) {
adjust = (float) mContext.getResources().getDisplayMetrics().densityDpi
/ mViewportDensityDpi;