am 8d03007f: Merge "Update zoom (aka display) density from WebView thread." into ics-mr1
* commit '8d03007f80d74abadfc96926e7cca40d38380bc0':
Update zoom (aka display) density from WebView thread.
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 7045f8c..877c9ea 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -742,6 +742,7 @@
static final int SCREEN_ON = 136;
static final int ENTER_FULLSCREEN_VIDEO = 137;
static final int UPDATE_SELECTION = 138;
+ static final int UPDATE_ZOOM_DENSITY = 139;
private static final int FIRST_PACKAGE_MSG_ID = SCROLL_TO_MSG_ID;
private static final int LAST_PACKAGE_MSG_ID = SET_TOUCH_HIGHLIGHT_RECTS;
@@ -797,7 +798,9 @@
"AUTOFILL_COMPLETE", // = 134;
"SELECT_AT", // = 135;
"SCREEN_ON", // = 136;
- "ENTER_FULLSCREEN_VIDEO" // = 137;
+ "ENTER_FULLSCREEN_VIDEO", // = 137;
+ "UPDATE_SELECTION", // = 138;
+ "UPDATE_ZOOM_DENSITY" // = 139;
};
// If the site doesn't use the viewport meta tag to specify the viewport,
@@ -8444,6 +8447,11 @@
mZoomManager.updateZoomRange(viewState, getViewWidth(), viewState.mScrollX);
break;
}
+ case UPDATE_ZOOM_DENSITY: {
+ final float density = (Float) msg.obj;
+ mZoomManager.updateDefaultZoomDensity(density);
+ break;
+ }
case REPLACE_BASE_CONTENT: {
nativeReplaceBaseContent(msg.arg1);
break;
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index a97f4dd..2ad866b 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -2337,7 +2337,8 @@
/ mViewportDensityDpi;
}
if (adjust != mWebView.getDefaultZoomScale()) {
- mWebView.updateDefaultZoomDensity(adjust);
+ Message.obtain(mWebView.mPrivateHandler,
+ WebView.UPDATE_ZOOM_DENSITY, adjust).sendToTarget();
}
int defaultScale = (int) (adjust * 100);