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 480fe3bd0a02fc1e01c29b85dff4709990a58527..ad4d53d11ce045adf0c59042d6ab72dc32a4dc7e 100644 |
| --- a/cc/trees/layer_tree_host_impl.cc |
| +++ b/cc/trees/layer_tree_host_impl.cc |
| @@ -2210,6 +2210,7 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point, |
| gfx::Vector2dF unused_root_delta; |
| bool did_scroll_x = false; |
| bool did_scroll_y = false; |
| + bool did_scroll_top_controls = false; |
| // TODO(wjmaclean) Should we guard against CurrentlyScrollingLayer() == 0 |
| // here? |
| bool consume_by_top_controls = |
| @@ -2235,8 +2236,10 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point, |
| applied_delta = pending_delta - excess_delta; |
| pending_delta = excess_delta; |
| // Force updating of vertical adjust values if needed. |
| - if (applied_delta.y() != 0) |
| + if (applied_delta.y() != 0) { |
| + did_scroll_top_controls = true; |
| layer_impl->ScrollbarParametersDidChange(); |
| + } |
| } |
| // Track root layer deltas for reporting overscroll. |
| unused_root_delta = pending_delta; |
| @@ -2300,8 +2303,8 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point, |
| break; |
| } |
| - bool did_scroll = did_scroll_x || did_scroll_y; |
| - if (did_scroll) { |
| + bool did_scroll_content = did_scroll_x || did_scroll_y; |
| + if (did_scroll_content) { |
|
aelias_OOO_until_Jul13
2014/03/07 21:09:09
I think this should also have "|| did_scroll_top_c
aelias_OOO_until_Jul13
2014/03/07 21:12:32
Sorry, ignore that comment. Of course, you didn't
|
| client_->SetNeedsCommitOnImplThread(); |
| SetNeedsRedraw(); |
| client_->RenewTreePriority(); |
| @@ -2323,7 +2326,7 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point, |
| input_handler_client_->DidOverscroll(params); |
| } |
| - return did_scroll; |
| + return did_scroll_content || did_scroll_top_controls; |
| } |
| // This implements scrolling by page as described here: |