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

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: Disable scroll bubbling test on Android. 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
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 3015 matching lines...) Expand 10 before | Expand all | Expand 10 after
3026 if (ScrollAnimationCreate(scroll_node, scroll_delta, delayed_by)) { 3026 if (ScrollAnimationCreate(scroll_node, scroll_delta, delayed_by)) {
3027 scroll_animating_latched_node_id_ = scroll_node->id; 3027 scroll_animating_latched_node_id_ = scroll_node->id;
3028 return scroll_status; 3028 return scroll_status;
3029 } 3029 }
3030 3030
3031 pending_delta -= scroll_delta; 3031 pending_delta -= scroll_delta;
3032 } 3032 }
3033 } 3033 }
3034 scroll_state.set_is_ending(true); 3034 scroll_state.set_is_ending(true);
3035 ScrollEnd(&scroll_state); 3035 ScrollEnd(&scroll_state);
3036 if (settings_.is_layer_tree_for_subframe &&
3037 scroll_status.thread == SCROLL_ON_IMPL_THREAD) {
3038 // If we get to here, we shouldn't return SCROLL_ON_IMPL_THREAD as otherwise
3039 // we'll mark the scroll as handled and the scroll won't bubble.
3040 scroll_status.thread = SCROLL_IGNORED;
3041 scroll_status.main_thread_scrolling_reasons =
3042 MainThreadScrollingReason::kNotScrollable;
3043 }
3036 return scroll_status; 3044 return scroll_status;
3037 } 3045 }
3038 3046
3039 gfx::Vector2dF LayerTreeHostImpl::ScrollNodeWithViewportSpaceDelta( 3047 gfx::Vector2dF LayerTreeHostImpl::ScrollNodeWithViewportSpaceDelta(
3040 ScrollNode* scroll_node, 3048 ScrollNode* scroll_node,
3041 const gfx::PointF& viewport_point, 3049 const gfx::PointF& viewport_point,
3042 const gfx::Vector2dF& viewport_delta, 3050 const gfx::Vector2dF& viewport_delta,
3043 ScrollTree* scroll_tree) { 3051 ScrollTree* scroll_tree) {
3044 // Layers with non-invertible screen space transforms should not have passed 3052 // Layers with non-invertible screen space transforms should not have passed
3045 // the scroll hit test in the first place. 3053 // the scroll hit test in the first place.
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
4297 } 4305 }
4298 4306
4299 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { 4307 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) {
4300 if (is_wheel_scroll) 4308 if (is_wheel_scroll)
4301 has_scrolled_by_wheel_ = true; 4309 has_scrolled_by_wheel_ = true;
4302 else 4310 else
4303 has_scrolled_by_touch_ = true; 4311 has_scrolled_by_touch_ = true;
4304 } 4312 }
4305 4313
4306 } // namespace cc 4314 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698