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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2714713003: Rename cc::ScrollNode's inner and outer viewport members (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 234ad1d3b3f19498d928522a9cc8c5e915e2ca6b..bd9d482bb35860193c42bfca21f95f75922bd88a 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2600,11 +2600,9 @@ LayerImpl* LayerTreeHostImpl::FindScrollLayerForDeviceViewportPoint(
// notifications. We use the viewport's main scroll layer to represent the
// viewport in scrolling code.
bool scrolls_inner_viewport =
- impl_scroll_node && InnerViewportScrollLayer() &&
- InnerViewportScrollLayer()->scroll_tree_index() == impl_scroll_node->id;
+ impl_scroll_node && impl_scroll_node->scrolls_inner_viewport;
bool scrolls_outer_viewport =
- impl_scroll_node && OuterViewportScrollLayer() &&
- OuterViewportScrollLayer()->scroll_tree_index() == impl_scroll_node->id;
+ impl_scroll_node && impl_scroll_node->scrolls_outer_viewport;
if (!impl_scroll_node || scrolls_inner_viewport || scrolls_outer_viewport) {
if (auto* mainScrollLayer = viewport()->MainScrollLayer())
impl_scroll_node = scroll_tree.Node(mainScrollLayer->scroll_tree_index());
@@ -3048,11 +3046,9 @@ void LayerTreeHostImpl::ApplyScroll(ScrollNode* scroll_node,
// element that's not a descendant of the document.rootScroller. In that case
// we want to scroll the inner viewport -- to allow panning while zoomed --
// but also move browser controls if needed.
- bool scrolls_inner_viewport_layer =
- InnerViewportScrollLayer() &&
- InnerViewportScrollLayer()->scroll_tree_index() == scroll_node->id;
+ bool scrolls_inner_viewport = scroll_node->scrolls_inner_viewport;
- if (scrolls_main_viewport_scroll_layer || scrolls_inner_viewport_layer) {
+ if (scrolls_main_viewport_scroll_layer || scrolls_inner_viewport) {
Viewport::ScrollResult result = viewport()->ScrollBy(
delta, viewport_point, scroll_state->is_direct_manipulation(),
!wheel_scrolling_, scrolls_main_viewport_scroll_layer);
@@ -3078,7 +3074,7 @@ void LayerTreeHostImpl::ApplyScroll(ScrollNode* scroll_node,
return;
}
- if (!scrolls_main_viewport_scroll_layer && !scrolls_inner_viewport_layer) {
+ if (!scrolls_main_viewport_scroll_layer && !scrolls_inner_viewport) {
// If the applied delta is within 45 degrees of the input
// delta, bail out to make it easier to scroll just one layer
// in one direction without affecting any of its parents.
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698