Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2458)

Unified Diff: android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java

Issue 872363005: Enable zoom and make contents fit into viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WIP: adjust to comments and check what to do with presubmit check Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
diff --git a/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java b/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
index adc43fe811164d5de7eff2153cd3fcb020e058c9..bd490f4c783198ed29d91b3324852d031e474cd9 100644
--- a/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
+++ b/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
@@ -149,9 +149,16 @@ public class AwShellActivity extends Activity {
mBrowserContext = new AwBrowserContext(sharedPreferences);
}
final AwSettings awSettings = new AwSettings(this /*context*/,
- false /*isAccessFromFileURLsGrantedByDefault*/, true /*supportsLegacyQuirks*/);
+ false /*isAccessFromFileURLsGrantedByDefault*/, false /*supportsLegacyQuirks*/);
// Required for WebGL conformance tests.
awSettings.setMediaPlaybackRequiresUserGesture(false);
+ // Allow zoom and fit contents to screen
+ awSettings.setBuiltInZoomControls(true);
+ awSettings.setDisplayZoomControls(false);
+ awSettings.setUseWideViewPort(true);
+ awSettings.setLoadWithOverviewMode(true);
+ awSettings.setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING);
+
testContainerView.initialize(new AwContents(mBrowserContext, testContainerView,
testContainerView.getContext(), testContainerView.getInternalAccessDelegate(),
testContainerView.getNativeGLDelegate(), awContentsClient, awSettings));
@@ -182,9 +189,9 @@ public class AwShellActivity extends Activity {
mUrlTextView.setOnEditorActionListener(new OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
- if ((actionId != EditorInfo.IME_ACTION_GO) && (event == null ||
- event.getKeyCode() != KeyEvent.KEYCODE_ENTER ||
- event.getAction() != KeyEvent.ACTION_DOWN)) {
Sergey 2015/02/03 07:11:43 git cl upload presubmit check annoyingly fails her
mnaganov (inactive) 2015/02/03 08:58:52 Absolutely.
+ if ((actionId != EditorInfo.IME_ACTION_GO) && (event == null
+ || event.getKeyCode() != KeyEvent.KEYCODE_ENTER
+ || event.getAction() != KeyEvent.ACTION_DOWN)) {
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698