Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Update the test Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3394 matching lines...) Expand 10 before | Expand all | Expand 10 after
3405 3405
3406 bool did_scroll_top_controls = 3406 bool did_scroll_top_controls =
3407 initial_top_controls_offset != 3407 initial_top_controls_offset !=
3408 browser_controls_offset_manager_->ControlsTopOffset(); 3408 browser_controls_offset_manager_->ControlsTopOffset();
3409 3409
3410 InputHandlerScrollResult scroll_result; 3410 InputHandlerScrollResult scroll_result;
3411 scroll_result.did_scroll = did_scroll_content || did_scroll_top_controls; 3411 scroll_result.did_scroll = did_scroll_content || did_scroll_top_controls;
3412 scroll_result.did_overscroll_root = !unused_root_delta.IsZero(); 3412 scroll_result.did_overscroll_root = !unused_root_delta.IsZero();
3413 scroll_result.accumulated_root_overscroll = accumulated_root_overscroll_; 3413 scroll_result.accumulated_root_overscroll = accumulated_root_overscroll_;
3414 scroll_result.unused_scroll_delta = unused_root_delta; 3414 scroll_result.unused_scroll_delta = unused_root_delta;
3415 3415 scroll_result.scroll_boundary_behavior =
3416 active_tree()->scroll_boundary_behavior();
3416 if (scroll_result.did_scroll) { 3417 if (scroll_result.did_scroll) {
3417 // Scrolling can change the root scroll offset, so inform the synchronous 3418 // Scrolling can change the root scroll offset, so inform the synchronous
3418 // input handler. 3419 // input handler.
3419 UpdateRootLayerStateForSynchronousInputHandler(); 3420 UpdateRootLayerStateForSynchronousInputHandler();
3420 } 3421 }
3421 3422
3422 // Update compositor worker mutations which may respond to scrolling. 3423 // Update compositor worker mutations which may respond to scrolling.
3423 Mutate(CurrentBeginFrameArgs().frame_time); 3424 Mutate(CurrentBeginFrameArgs().frame_time);
3424 3425
3425 return scroll_result; 3426 return scroll_result;
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
4309 4310
4310 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { 4311 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) {
4311 if (!element_id) 4312 if (!element_id)
4312 return; 4313 return;
4313 if (ScrollbarAnimationController* animation_controller = 4314 if (ScrollbarAnimationController* animation_controller =
4314 ScrollbarAnimationControllerForElementId(element_id)) 4315 ScrollbarAnimationControllerForElementId(element_id))
4315 animation_controller->DidScrollUpdate(); 4316 animation_controller->DidScrollUpdate();
4316 } 4317 }
4317 4318
4318 } // namespace cc 4319 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698