summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit/WebView.java
diff options
context:
space:
mode:
authorMangesh Ghiware <mghiware@google.com>2011-11-16 18:01:35 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-11-16 18:01:35 -0800
commit4fdfdeedc64eef2efe3811198e8fad40aa1b8fc3 (patch)
tree5ea7a9e7fc29b8792bfdb85b7ad65c6d96cb4a91 /core/java/android/webkit/WebView.java
parente5febfd5bd9b19a01383760b523476ba7f013a5c (diff)
parente832b63c97c18c8170643c5a1c565e07893c5368 (diff)
downloadframeworks_base-4fdfdeedc64eef2efe3811198e8fad40aa1b8fc3.zip
frameworks_base-4fdfdeedc64eef2efe3811198e8fad40aa1b8fc3.tar.gz
frameworks_base-4fdfdeedc64eef2efe3811198e8fad40aa1b8fc3.tar.bz2
Merge "Revert change to setInitialScale() to take display density into account." into ics-mr1
Diffstat (limited to 'core/java/android/webkit/WebView.java')
-rw-r--r--core/java/android/webkit/WebView.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index ec2f55b..907e8db 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -1341,9 +1341,13 @@ public class WebView extends AbsoluteLayout
}
}
- /* package */void updateDefaultZoomDensity(int zoomDensity) {
+ /* package */ void adjustDefaultZoomDensity(int zoomDensity) {
final float density = mContext.getResources().getDisplayMetrics().density
* 100 / zoomDensity;
+ updateDefaultZoomDensity(density);
+ }
+
+ /* package */ void updateDefaultZoomDensity(float density) {
mNavSlop = (int) (16 * density);
mZoomManager.updateDefaultZoomDensity(density);
}
@@ -2469,7 +2473,9 @@ public class WebView extends AbsoluteLayout
* Set the initial scale for the WebView. 0 means default. If
* {@link WebSettings#getUseWideViewPort()} is true, it zooms out all the
* way. Otherwise it starts with 100%. If initial scale is greater than 0,
- * WebView starts will this value as initial scale.
+ * WebView starts with this value as initial scale.
+ * Please note that unlike the scale properties in the viewport meta tag,
+ * this method doesn't take the screen density into account.
*
* @param scaleInPercent The initial scale in percent.
*/