| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 3559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3570 | 3570 |
| 3571 bool did_scroll_top_controls = | 3571 bool did_scroll_top_controls = |
| 3572 initial_top_controls_offset != | 3572 initial_top_controls_offset != |
| 3573 browser_controls_offset_manager_->ControlsTopOffset(); | 3573 browser_controls_offset_manager_->ControlsTopOffset(); |
| 3574 | 3574 |
| 3575 InputHandlerScrollResult scroll_result; | 3575 InputHandlerScrollResult scroll_result; |
| 3576 scroll_result.did_scroll = did_scroll_content || did_scroll_top_controls; | 3576 scroll_result.did_scroll = did_scroll_content || did_scroll_top_controls; |
| 3577 scroll_result.did_overscroll_root = !unused_root_delta.IsZero(); | 3577 scroll_result.did_overscroll_root = !unused_root_delta.IsZero(); |
| 3578 scroll_result.accumulated_root_overscroll = accumulated_root_overscroll_; | 3578 scroll_result.accumulated_root_overscroll = accumulated_root_overscroll_; |
| 3579 scroll_result.unused_scroll_delta = unused_root_delta; | 3579 scroll_result.unused_scroll_delta = unused_root_delta; |
| 3580 | 3580 scroll_result.scroll_boundary_behavior = |
| 3581 active_tree()->scroll_boundary_behavior(); |
| 3581 if (scroll_result.did_scroll) { | 3582 if (scroll_result.did_scroll) { |
| 3582 // Scrolling can change the root scroll offset, so inform the synchronous | 3583 // Scrolling can change the root scroll offset, so inform the synchronous |
| 3583 // input handler. | 3584 // input handler. |
| 3584 UpdateRootLayerStateForSynchronousInputHandler(); | 3585 UpdateRootLayerStateForSynchronousInputHandler(); |
| 3585 } | 3586 } |
| 3586 | 3587 |
| 3587 // Update compositor worker mutations which may respond to scrolling. | 3588 // Update compositor worker mutations which may respond to scrolling. |
| 3588 Mutate(CurrentBeginFrameArgs().frame_time); | 3589 Mutate(CurrentBeginFrameArgs().frame_time); |
| 3589 | 3590 |
| 3590 return scroll_result; | 3591 return scroll_result; |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4469 | 4470 |
| 4470 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { | 4471 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { |
| 4471 if (!element_id) | 4472 if (!element_id) |
| 4472 return; | 4473 return; |
| 4473 if (ScrollbarAnimationController* animation_controller = | 4474 if (ScrollbarAnimationController* animation_controller = |
| 4474 ScrollbarAnimationControllerForElementId(element_id)) | 4475 ScrollbarAnimationControllerForElementId(element_id)) |
| 4475 animation_controller->DidScrollUpdate(); | 4476 animation_controller->DidScrollUpdate(); |
| 4476 } | 4477 } |
| 4477 | 4478 |
| 4478 } // namespace cc | 4479 } // namespace cc |
| OLD | NEW |