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

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

Issue 2785533003: Animated scroll shouldn't consume unhandled scrolls for OOPIFs. (Closed)
Patch Set: Address nits, add comments. Created 3 years, 8 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
« no previous file with comments | « cc/trees/layer_tree_host_client.h ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3017 matching lines...) Expand 10 before | Expand all | Expand 10 after
3028 if (ScrollAnimationCreate(scroll_node, scroll_delta, delayed_by)) { 3028 if (ScrollAnimationCreate(scroll_node, scroll_delta, delayed_by)) {
3029 scroll_animating_latched_node_id_ = scroll_node->id; 3029 scroll_animating_latched_node_id_ = scroll_node->id;
3030 return scroll_status; 3030 return scroll_status;
3031 } 3031 }
3032 3032
3033 pending_delta -= scroll_delta; 3033 pending_delta -= scroll_delta;
3034 } 3034 }
3035 } 3035 }
3036 scroll_state.set_is_ending(true); 3036 scroll_state.set_is_ending(true);
3037 ScrollEnd(&scroll_state); 3037 ScrollEnd(&scroll_state);
3038 if (settings_.is_layer_tree_for_subframe &&
3039 scroll_status.thread == SCROLL_ON_IMPL_THREAD) {
3040 // If we get to here, we shouldn't return SCROLL_ON_IMPL_THREAD as otherwise
3041 // we'll mark the scroll as handled and the scroll won't bubble.
3042 scroll_status.thread = SCROLL_IGNORED;
3043 scroll_status.main_thread_scrolling_reasons =
3044 MainThreadScrollingReason::kNotScrollable;
3045 }
3038 return scroll_status; 3046 return scroll_status;
3039 } 3047 }
3040 3048
3041 gfx::Vector2dF LayerTreeHostImpl::ScrollNodeWithViewportSpaceDelta( 3049 gfx::Vector2dF LayerTreeHostImpl::ScrollNodeWithViewportSpaceDelta(
3042 ScrollNode* scroll_node, 3050 ScrollNode* scroll_node,
3043 const gfx::PointF& viewport_point, 3051 const gfx::PointF& viewport_point,
3044 const gfx::Vector2dF& viewport_delta, 3052 const gfx::Vector2dF& viewport_delta,
3045 ScrollTree* scroll_tree) { 3053 ScrollTree* scroll_tree) {
3046 // Layers with non-invertible screen space transforms should not have passed 3054 // Layers with non-invertible screen space transforms should not have passed
3047 // the scroll hit test in the first place. 3055 // the scroll hit test in the first place.
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
4299 } 4307 }
4300 4308
4301 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { 4309 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) {
4302 if (is_wheel_scroll) 4310 if (is_wheel_scroll)
4303 has_scrolled_by_wheel_ = true; 4311 has_scrolled_by_wheel_ = true;
4304 else 4312 else
4305 has_scrolled_by_touch_ = true; 4313 has_scrolled_by_touch_ = true;
4306 } 4314 }
4307 4315
4308 } // namespace cc 4316 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_client.h ('k') | cc/trees/layer_tree_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698