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

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

Issue 2769793002: Implement CSS: scroll-boundary-behavior (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into scroll-boundary Created 3 years, 9 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 3153 matching lines...) Expand 10 before | Expand all | Expand 10 after
3164 scroll_node = scroll_tree.parent(scroll_node)) { 3164 scroll_node = scroll_tree.parent(scroll_node)) {
3165 if (scroll_node == viewport_scroll_node) { 3165 if (scroll_node == viewport_scroll_node) {
3166 // Don't chain scrolls past the outer viewport scroll layer. Once we 3166 // Don't chain scrolls past the outer viewport scroll layer. Once we
3167 // reach that, we should scroll the viewport which is represented by the 3167 // reach that, we should scroll the viewport which is represented by the
3168 // main viewport scroll layer. 3168 // main viewport scroll layer.
3169 DCHECK(viewport_scroll_node); 3169 DCHECK(viewport_scroll_node);
3170 current_scroll_chain.push_front(viewport_scroll_node); 3170 current_scroll_chain.push_front(viewport_scroll_node);
3171 break; 3171 break;
3172 } 3172 }
3173 3173
3174 if (!scroll_node->scrollable) 3174 if (scroll_node->scrollable)
3175 continue; 3175 current_scroll_chain.push_front(scroll_node);
3176 3176
3177 current_scroll_chain.push_front(scroll_node); 3177 LayerImpl* layer =
bokan 2017/03/23 13:18:26 Layers are eventually going away. Instead of propa
sunyunjia 2017/03/23 20:16:54 Done.
3178 active_tree()->FindActiveTreeLayerById(scroll_node->owning_layer_id);
3179 if (layer->scrollBoundaryBehavior() != SCROLL_BOUNDARY_BEHAVIOR_PROPAGATE)
3180 break;
3178 } 3181 }
3179 } 3182 }
3180 scroll_state->set_scroll_chain_and_layer_tree(current_scroll_chain, 3183 scroll_state->set_scroll_chain_and_layer_tree(current_scroll_chain,
3181 active_tree()); 3184 active_tree());
3182 scroll_state->DistributeToScrollChainDescendant(); 3185 scroll_state->DistributeToScrollChainDescendant();
3183 } 3186 }
3184 3187
3185 InputHandlerScrollResult LayerTreeHostImpl::ScrollBy( 3188 InputHandlerScrollResult LayerTreeHostImpl::ScrollBy(
3186 ScrollState* scroll_state) { 3189 ScrollState* scroll_state) {
3187 DCHECK(scroll_state); 3190 DCHECK(scroll_state);
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
4186 worker_context_visibility_ = 4189 worker_context_visibility_ =
4187 worker_context->CacheController()->ClientBecameVisible(); 4190 worker_context->CacheController()->ClientBecameVisible();
4188 } else { 4191 } else {
4189 worker_context->CacheController()->ClientBecameNotVisible( 4192 worker_context->CacheController()->ClientBecameNotVisible(
4190 std::move(worker_context_visibility_)); 4193 std::move(worker_context_visibility_));
4191 } 4194 }
4192 } 4195 }
4193 } 4196 }
4194 4197
4195 } // namespace cc 4198 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698