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

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

Issue 2479663002: Move compositor InputHandler from RenderViewImpl to RenderWidget. (Closed)
Patch Set: Plumb pseudo touch-event-rects for OOPIFs to compositor. Created 3 years, 11 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 2977 matching lines...) Expand 10 before | Expand all | Expand 10 after
2988 bool is_viewport_scroll_layer = 2988 bool is_viewport_scroll_layer =
2989 viewport()->MainScrollLayer() && 2989 viewport()->MainScrollLayer() &&
2990 scroll_node->owning_layer_id == viewport()->MainScrollLayer()->id(); 2990 scroll_node->owning_layer_id == viewport()->MainScrollLayer()->id();
2991 2991
2992 // This is needed if the scroll chains up to the viewport without going 2992 // This is needed if the scroll chains up to the viewport without going
2993 // through the outer viewport scroll layer. This can happen if we scroll an 2993 // through the outer viewport scroll layer. This can happen if we scroll an
2994 // element that's not a descendant of the document.rootScroller. In that case 2994 // element that's not a descendant of the document.rootScroller. In that case
2995 // we want to scroll the inner viewport -- to allow panning while zoomed -- 2995 // we want to scroll the inner viewport -- to allow panning while zoomed --
2996 // but also move browser controls if needed. 2996 // but also move browser controls if needed.
2997 bool is_inner_viewport_scroll_layer = 2997 bool is_inner_viewport_scroll_layer =
2998 InnerViewportScrollLayer() &&
2998 scroll_node->owning_layer_id == InnerViewportScrollLayer()->id(); 2999 scroll_node->owning_layer_id == InnerViewportScrollLayer()->id();
2999 3000
3000 if (is_viewport_scroll_layer || is_inner_viewport_scroll_layer) { 3001 if (is_viewport_scroll_layer || is_inner_viewport_scroll_layer) {
3001 Viewport::ScrollResult result = viewport()->ScrollBy( 3002 Viewport::ScrollResult result = viewport()->ScrollBy(
3002 delta, viewport_point, scroll_state->is_direct_manipulation(), 3003 delta, viewport_point, scroll_state->is_direct_manipulation(),
3003 !wheel_scrolling_, is_viewport_scroll_layer); 3004 !wheel_scrolling_, is_viewport_scroll_layer);
3004 3005
3005 applied_delta = result.consumed_delta; 3006 applied_delta = result.consumed_delta;
3006 delta_applied_to_content = result.content_scrolled_delta; 3007 delta_applied_to_content = result.content_scrolled_delta;
3007 } else { 3008 } else {
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
4092 worker_context_visibility_ = 4093 worker_context_visibility_ =
4093 worker_context->CacheController()->ClientBecameVisible(); 4094 worker_context->CacheController()->ClientBecameVisible();
4094 } else { 4095 } else {
4095 worker_context->CacheController()->ClientBecameNotVisible( 4096 worker_context->CacheController()->ClientBecameNotVisible(
4096 std::move(worker_context_visibility_)); 4097 std::move(worker_context_visibility_));
4097 } 4098 }
4098 } 4099 }
4099 } 4100 }
4100 4101
4101 } // namespace cc 4102 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698