diff options
-rw-r--r-- | android_webview/lib/main/aw_main_delegate.cc | 3 | ||||
-rw-r--r-- | cc/base/switches.cc | 4 | ||||
-rw-r--r-- | cc/base/switches.h | 1 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_impl.cc | 2 | ||||
-rw-r--r-- | cc/trees/layer_tree_settings.cc | 3 | ||||
-rw-r--r-- | cc/trees/layer_tree_settings.h | 1 | ||||
-rw-r--r-- | chrome/app/generated_resources.grd | 6 | ||||
-rw-r--r-- | chrome/browser/about_flags.cc | 7 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/chrome_restart_request.cc | 1 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.cc | 1 | ||||
-rw-r--r-- | content/browser/web_contents/web_contents_impl.cc | 2 | ||||
-rw-r--r-- | content/public/common/common_param_traits_macros.h | 1 | ||||
-rw-r--r-- | content/renderer/gpu/render_widget_compositor.cc | 2 | ||||
-rw-r--r-- | content/renderer/web_preferences.cc | 1 | ||||
-rw-r--r-- | webkit/common/webpreferences.cc | 1 | ||||
-rw-r--r-- | webkit/common/webpreferences.h | 1 |
16 files changed, 36 insertions, 1 deletions
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc index eff0be6..02f030f 100644 --- a/android_webview/lib/main/aw_main_delegate.cc +++ b/android_webview/lib/main/aw_main_delegate.cc @@ -75,6 +75,9 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) { // Enable D-PAD navigation for application compatibility. cl->AppendSwitch(switches::kEnableSpatialNavigation); + // Disable compositor touch hit testing for now to mitigate risk of bugs. + cl->AppendSwitch(cc::switches::kDisableCompositorTouchHitTesting); + // Disable WebRTC. cl->AppendSwitch(switches::kDisableWebRTC); diff --git a/cc/base/switches.cc b/cc/base/switches.cc index 87e10ce..5dbb296 100644 --- a/cc/base/switches.cc +++ b/cc/base/switches.cc @@ -144,6 +144,10 @@ const char kCCLayerTreeTestNoTimeout[] = "cc-layer-tree-test-no-timeout"; // Disable textures using RGBA_4444 layout. const char kDisable4444Textures[] = "disable-4444-textures"; +// Disable touch hit testing in the compositor. +const char kDisableCompositorTouchHitTesting[] = + "disable-compositor-touch-hit-testing"; + bool IsLCDTextEnabled() { const CommandLine* command_line = CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(cc::switches::kDisableLCDText)) diff --git a/cc/base/switches.h b/cc/base/switches.h index 97fe833..ed6555a 100644 --- a/cc/base/switches.h +++ b/cc/base/switches.h @@ -42,6 +42,7 @@ CC_EXPORT extern const char kStrictLayerPropertyChangeChecking[]; CC_EXPORT extern const char kEnableMapImage[]; CC_EXPORT extern const char kDisableMapImage[]; CC_EXPORT extern const char kDisable4444Textures[]; +CC_EXPORT extern const char kDisableCompositorTouchHitTesting[]; // Switches for both the renderer and ui compositors. CC_EXPORT extern const char kUIDisablePartialSwap[]; diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index a224224..d8ca19b 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -426,6 +426,8 @@ void LayerTreeHostImpl::ScheduleAnimation() { } bool LayerTreeHostImpl::HaveTouchEventHandlersAt(gfx::Point viewport_point) { + if (!settings_.touch_hit_testing) + return true; if (!EnsureRenderSurfaceLayerList()) return false; diff --git a/cc/trees/layer_tree_settings.cc b/cc/trees/layer_tree_settings.cc index 46c9e9d..894436b 100644 --- a/cc/trees/layer_tree_settings.cc +++ b/cc/trees/layer_tree_settings.cc @@ -58,7 +58,8 @@ LayerTreeSettings::LayerTreeSettings() use_map_image(false), ignore_root_layer_flings(false), use_rgba_4444_textures(false), - always_overscroll(false) { + always_overscroll(false), + touch_hit_testing(true) { } LayerTreeSettings::~LayerTreeSettings() {} diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h index 4b51069..d8ec0e3 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -69,6 +69,7 @@ class CC_EXPORT LayerTreeSettings { bool ignore_root_layer_flings; bool use_rgba_4444_textures; bool always_overscroll; + bool touch_hit_testing; LayerTreeDebugState initial_debug_state; }; diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 8a7d689..2e6f50f 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -5622,6 +5622,12 @@ Keep your key file in a safe place. You will need it to create new versions of y <message name="IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION" desc="Description of the disable touch adjustment flag."> Disables touch adjustment support. Touch adjustment is the process of refining the position of a touch gesture in order to compensate for touches having poor resolution compared to a mouse. </message> + <message name="IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_NAME" desc="Title of the disable compositor touch hit testing flag."> + Disable compositor touch hit testing. + </message> + <message name="IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_DESCRIPTION" desc="Description of the disable compositor touch hit testing flags."> + Disables an optimization intended to improve touch scrolling responsiveness. Forces all touch events to go to the blink main thread to look for handlers, instead of potentially short-circuiting from the compositor thread. + </message> <message name="IDS_ENABLE_BACKLOADER_NAME" desc="Title of the enable background loader flag." > Enable background loader component for hosted applications </message> diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 319b192..688ffc9 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -1750,6 +1750,13 @@ const Experiment kExperiments[] = { SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUI) }, #endif + { + "disable-compositor-touch-hit-testing", + IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_NAME, + IDS_FLAGS_DISABLE_COMPOSITOR_TOUCH_HIT_TESTING_DESCRIPTION, + kOsAll, + SINGLE_VALUE_TYPE(cc::switches::kDisableCompositorTouchHitTesting), + }, }; const Experiment* experiments = kExperiments; diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc index 90af3d6..74258384 100644 --- a/chrome/browser/chromeos/login/chrome_restart_request.cc +++ b/chrome/browser/chromeos/login/chrome_restart_request.cc @@ -161,6 +161,7 @@ std::string DeriveCommandLine(const GURL& start_url, cc::switches::kBackgroundColorInsteadOfCheckerboard, cc::switches::kCompositeToMailbox, cc::switches::kDisableCompositedAntialiasing, + cc::switches::kDisableCompositorTouchHitTesting, cc::switches::kDisableImplSidePainting, cc::switches::kDisableMapImage, cc::switches::kDisableThreadedAnimation, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index d6fb90e..73dd859 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -992,6 +992,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( cc::switches::kBackgroundColorInsteadOfCheckerboard, cc::switches::kCompositeToMailbox, cc::switches::kDisableCompositedAntialiasing, + cc::switches::kDisableCompositorTouchHitTesting, cc::switches::kDisableImplSidePainting, cc::switches::kDisableLCDText, cc::switches::kDisableMapImage, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 23661f0..9a57c91 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -595,6 +595,8 @@ WebPreferences WebContentsImpl::GetWebkitPrefs(RenderViewHost* rvh, prefs.touch_adjustment_enabled = !command_line.HasSwitch(switches::kDisableTouchAdjustment); + prefs.compositor_touch_hit_testing = + !command_line.HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); #if defined(OS_MACOSX) || defined(OS_CHROMEOS) bool default_enable_scroll_animator = true; diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h index 95c8bdc..b92cafd 100644 --- a/content/public/common/common_param_traits_macros.h +++ b/content/public/common/common_param_traits_macros.h @@ -171,6 +171,7 @@ IPC_STRUCT_TRAITS_BEGIN(WebPreferences) IPC_STRUCT_TRAITS_MEMBER(viewport_enabled) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) + IPC_STRUCT_TRAITS_MEMBER(compositor_touch_hit_testing) IPC_STRUCT_TRAITS_MEMBER(cookie_enabled) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) #if defined(OS_ANDROID) diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index 4bb9980..88fce98 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc @@ -111,6 +111,8 @@ scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create( !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); settings.force_direct_layer_drawing = cmd->HasSwitch(cc::switches::kForceDirectLayerDrawing); + settings.touch_hit_testing = + !cmd->HasSwitch(cc::switches::kDisableCompositorTouchHitTesting); int default_tile_width = settings.default_tile_size.width(); if (cmd->HasSwitch(switches::kDefaultTileWidth)) { diff --git a/content/renderer/web_preferences.cc b/content/renderer/web_preferences.cc index f558189..b764138 100644 --- a/content/renderer/web_preferences.cc +++ b/content/renderer/web_preferences.cc @@ -360,6 +360,7 @@ void ApplyWebPreferences(const WebPreferences& prefs, WebView* web_view) { settings->setPinchOverlayScrollbarThickness( prefs.pinch_overlay_scrollbar_thickness); settings->setUseSolidColorScrollbars(prefs.use_solid_color_scrollbars); + settings->setCompositorTouchHitTesting(prefs.compositor_touch_hit_testing); } } // namespace content diff --git a/webkit/common/webpreferences.cc b/webkit/common/webpreferences.cc index 0167a07..425c472 100644 --- a/webkit/common/webpreferences.cc +++ b/webkit/common/webpreferences.cc @@ -119,6 +119,7 @@ WebPreferences::WebPreferences() pinch_virtual_viewport_enabled(false), pinch_overlay_scrollbar_thickness(0), use_solid_color_scrollbars(false), + compositor_touch_hit_testing(true), cookie_enabled(true) #if defined(OS_ANDROID) , diff --git a/webkit/common/webpreferences.h b/webkit/common/webpreferences.h index 49a7fd8..c5578591 100644 --- a/webkit/common/webpreferences.h +++ b/webkit/common/webpreferences.h @@ -155,6 +155,7 @@ struct WEBKIT_COMMON_EXPORT WebPreferences { bool pinch_virtual_viewport_enabled; int pinch_overlay_scrollbar_thickness; bool use_solid_color_scrollbars; + bool compositor_touch_hit_testing; // This flags corresponds to a Page's Settings' setCookieEnabled state. It // only controls whether or not the "document.cookie" field is properly |