Chromium Code Reviews| Index: cc/trees/layer_tree_host_impl.cc |
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
| index 685cfb99122f393eec5b610e90c35c8c51ed546d..f60df2c535024ce98feb1997dee9a6fdd5ab832b 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -2367,6 +2367,24 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point, |
| if (did_scroll_y) |
| accumulated_root_overscroll_.set_y(0); |
| + if (!settings_.using_synchronous_renderer_compositor) { |
|
jdduke (slow)
2014/04/09 17:35:00
I don't think we want to piggyback on this setting
aelias_OOO_until_Jul13
2014/04/09 19:43:43
"report_overscroll_only_for_scrollable_axes" sound
|
| + gfx::SizeF ceiled_viewport_size = |
| + gfx::ToCeiledSize(active_tree_->ScrollableViewportSize()); |
| + gfx::SizeF root_layer_size = active_tree_->ScrollableSize(); |
| + if (!(ceiled_viewport_size.width() < root_layer_size.width())) { |
| + // Horizontal Glow Disabled as scrolling on Horizontal axes is impossible. |
|
jdduke (slow)
2014/04/09 17:35:00
I wonder if we should just use:
if (InnerViewport
aelias_OOO_until_Jul13
2014/04/09 19:43:43
This sounds fine. If MaxScrollOffset suffers from
|
| + if ((unused_root_delta.x() != 0 && unused_root_delta.y() == 0 && |
| + !did_scroll_x)) |
| + return did_scroll_content || did_scroll_top_controls; |
| + } |
| + if (!(ceiled_viewport_size.height() < root_layer_size.height())) { |
| + // Vertical Glow Disabled as scrolling on Horizontal axes is impossible. |
| + if ((unused_root_delta.x() == 0 && unused_root_delta.y() != 0 && |
| + !did_scroll_y)) |
| + return did_scroll_content || did_scroll_top_controls; |
| + } |
| + } |
| + |
| accumulated_root_overscroll_ += unused_root_delta; |
| bool did_overscroll = !unused_root_delta.IsZero(); |
| if (did_overscroll && input_handler_client_) { |