diff options
author | jdduke <jdduke@chromium.org> | 2015-02-11 22:28:20 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-12 06:28:50 +0000 |
commit | 2afdbf72bcfa0a2e30d31a37ca6499dcb99a62aa (patch) | |
tree | 22e2334dc83b82ccb0f367e9bc2070615863437f /cc/trees/layer_tree_host_impl.cc | |
parent | 55f1e5199dcc7363466ff424e2a1325c2fc9fa6f (diff) | |
download | chromium_src-2afdbf72bcfa0a2e30d31a37ca6499dcb99a62aa.zip chromium_src-2afdbf72bcfa0a2e30d31a37ca6499dcb99a62aa.tar.gz chromium_src-2afdbf72bcfa0a2e30d31a37ca6499dcb99a62aa.tar.bz2 |
[Android] Disable pull-to-refresh with overflow-y:hidden
Currently, the only way to disable the pull-to-refresh effect is to
explictly preventDefault the causal touches or suppress their default
actions with touch-action: none. However, the latter prevents
any kind of accelerated scrolling, and the former can be to get right
with composed or nested scrollable content.
Use the overflow-y:hidden property on the root element as a signal to
disable the effect. This dovetails with how this property both prevents
hiding of the top controls and suppresses the overscroll glow effect.
BUG=456515,456300
Review URL: https://codereview.chromium.org/910373002
Cr-Commit-Position: refs/heads/master@{#315938}
Diffstat (limited to 'cc/trees/layer_tree_host_impl.cc')
-rw-r--r-- | cc/trees/layer_tree_host_impl.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index bd77d84..95e1ab1 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -1458,6 +1458,16 @@ CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() const { active_tree_->GetViewportSelection(&metadata.selection_start, &metadata.selection_end); + LayerImpl* root_layer_for_overflow = OuterViewportScrollLayer() + ? OuterViewportScrollLayer() + : InnerViewportScrollLayer(); + if (root_layer_for_overflow) { + metadata.root_overflow_x_hidden = + !root_layer_for_overflow->user_scrollable_horizontal(); + metadata.root_overflow_y_hidden = + !root_layer_for_overflow->user_scrollable_vertical(); + } + if (!InnerViewportScrollLayer()) return metadata; |