summaryrefslogtreecommitdiffstats
path: root/content/browser/android
diff options
context:
space:
mode:
authorbokan@chromium.org <bokan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-12 20:15:28 +0000
committerbokan@chromium.org <bokan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-12 20:15:28 +0000
commita41f8f60ba86a09490de53a738f2adee9a618ccb (patch)
tree183429c3329a85e9af57e94c34a50e7e1f1cff1e /content/browser/android
parentce1b85f611d42dd91eab1db7d4e73df7d1a7b51a (diff)
downloadchromium_src-a41f8f60ba86a09490de53a738f2adee9a618ccb.zip
chromium_src-a41f8f60ba86a09490de53a738f2adee9a618ccb.tar.gz
chromium_src-a41f8f60ba86a09490de53a738f2adee9a618ccb.tar.bz2
Experimental viewport meta tag support for desktop
Added flag to allow desktop builds to experimentally turn on support for the viewport meta tag. The --enable-viewport flag now turns on only support for @viewport. --enable-viewport-meta turns on viewport meta and @viewport support. On Android, the viewport gets rescaled when the view is resized, i.e. phone is rotated between landscape and portrait. On desktop, enabling the viewport causes the page to zoom out when the window is shrunk, rather than adding scrollbars. To support viewport on both devices, I've added a --main-frame-resizes-are-orientation-changes flag that should be set on Android and not desktop. This prevents the viewport scaling code in WebViewImpl::resize(). Enabling viewport on desktop means the page scale can change. This causes a known issue with scrollbars where mouse events are scaled with the page, making mouse interaction with scrollbars broken. This is the Chromium side of a 2-side patch (Blink-side at https://codereview.chromium.org/40423003/) BUG=232102 Review URL: https://codereview.chromium.org/38793007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234617 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/android')
-rw-r--r--content/browser/android/content_startup_flags.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/content/browser/android/content_startup_flags.cc b/content/browser/android/content_startup_flags.cc
index 11c7932..8f7e29c 100644
--- a/content/browser/android/content_startup_flags.cc
+++ b/content/browser/android/content_startup_flags.cc
@@ -73,6 +73,9 @@ void SetContentCommandLineFlags(int max_render_process_count,
parsed_command_line->AppendSwitch(switches::kDisableGpuShaderDiskCache);
parsed_command_line->AppendSwitch(switches::kEnableViewport);
+ parsed_command_line->AppendSwitch(switches::kEnableViewportMeta);
+ parsed_command_line->AppendSwitch(
+ switches::kMainFrameResizesAreOrientationChanges);
// Disable anti-aliasing.
parsed_command_line->AppendSwitch(