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

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: Fix Android compile. 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) {
bokan 2017/04/11 16:23:13 Should this be `is_layer_tree_for_subframe && scro
wjmaclean 2017/04/11 20:04:51 Good catch, thanks.
3037 // If we get to here, we shouldn't return SCROLL_ON_IMPL_THREAD as otherwise
3038 // we'll mark the scroll as handled and the scroll won't bubble.
3039 scroll_status.thread = SCROLL_IGNORED;
bokan 2017/04/11 16:23:14 How does this work for non-animated scrolls? In th
wjmaclean 2017/04/11 20:04:51 I haven't been able to reproduce the touch scrolli
3040 scroll_status.main_thread_scrolling_reasons =
3041 MainThreadScrollingReason::kNotScrollable;
3042 }
3036 return scroll_status; 3043 return scroll_status;
3037 } 3044 }
3038 3045
3039 gfx::Vector2dF LayerTreeHostImpl::ScrollNodeWithViewportSpaceDelta( 3046 gfx::Vector2dF LayerTreeHostImpl::ScrollNodeWithViewportSpaceDelta(
3040 ScrollNode* scroll_node, 3047 ScrollNode* scroll_node,
3041 const gfx::PointF& viewport_point, 3048 const gfx::PointF& viewport_point,
3042 const gfx::Vector2dF& viewport_delta, 3049 const gfx::Vector2dF& viewport_delta,
3043 ScrollTree* scroll_tree) { 3050 ScrollTree* scroll_tree) {
3044 // Layers with non-invertible screen space transforms should not have passed 3051 // Layers with non-invertible screen space transforms should not have passed
3045 // the scroll hit test in the first place. 3052 // the scroll hit test in the first place.
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
4297 } 4304 }
4298 4305
4299 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) { 4306 void LayerTreeHostImpl::UpdateScrollSourceInfo(bool is_wheel_scroll) {
4300 if (is_wheel_scroll) 4307 if (is_wheel_scroll)
4301 has_scrolled_by_wheel_ = true; 4308 has_scrolled_by_wheel_ = true;
4302 else 4309 else
4303 has_scrolled_by_touch_ = true; 4310 has_scrolled_by_touch_ = true;
4304 } 4311 }
4305 4312
4306 } // namespace cc 4313 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698