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

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

Issue 1639363002: Move have_wheel_event_handlers to WebLayerTreeView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove blank line Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 if ((scrolling_layer_impl == InnerViewportScrollLayer() && 565 if ((scrolling_layer_impl == InnerViewportScrollLayer() &&
566 test_layer_impl == OuterViewportScrollLayer()) || 566 test_layer_impl == OuterViewportScrollLayer()) ||
567 (scrolling_layer_impl == OuterViewportScrollLayer() && 567 (scrolling_layer_impl == OuterViewportScrollLayer() &&
568 test_layer_impl == InnerViewportScrollLayer())) { 568 test_layer_impl == InnerViewportScrollLayer())) {
569 return true; 569 return true;
570 } 570 }
571 571
572 return false; 572 return false;
573 } 573 }
574 574
575 bool LayerTreeHostImpl::HaveWheelEventHandlersAt( 575 bool LayerTreeHostImpl::HaveWheelEventHandlers() const {
576 const gfx::Point& viewport_point) { 576 return active_tree_->have_wheel_event_handlers();
577 gfx::PointF device_viewport_point = gfx::ScalePoint(
578 gfx::PointF(viewport_point), active_tree_->device_scale_factor());
579
580 LayerImpl* layer_impl =
581 active_tree_->FindLayerWithWheelHandlerThatIsHitByPoint(
582 device_viewport_point);
583
584 return layer_impl != NULL;
585 } 577 }
586 578
587 static LayerImpl* NextLayerInScrollOrder(LayerImpl* layer) { 579 static LayerImpl* NextLayerInScrollOrder(LayerImpl* layer) {
588 if (layer->scroll_parent()) 580 if (layer->scroll_parent())
589 return layer->scroll_parent(); 581 return layer->scroll_parent();
590 582
591 return layer->parent(); 583 return layer->parent();
592 } 584 }
593 585
594 bool LayerTreeHostImpl::DoTouchEventsBlockScrollAt( 586 bool LayerTreeHostImpl::DoTouchEventsBlockScrollAt(
(...skipping 3304 matching lines...) Expand 10 before | Expand all | Expand 10 after
3899 return task_runner_provider_->HasImplThread(); 3891 return task_runner_provider_->HasImplThread();
3900 } 3892 }
3901 3893
3902 bool LayerTreeHostImpl::CommitToActiveTree() const { 3894 bool LayerTreeHostImpl::CommitToActiveTree() const {
3903 // In single threaded mode we skip the pending tree and commit directly to the 3895 // In single threaded mode we skip the pending tree and commit directly to the
3904 // active tree. 3896 // active tree.
3905 return !task_runner_provider_->HasImplThread(); 3897 return !task_runner_provider_->HasImplThread();
3906 } 3898 }
3907 3899
3908 } // namespace cc 3900 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698