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

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

Issue 1864633002: Fix issue with hit testing on the layer tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 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
« no previous file with comments | « no previous file | cc/trees/layer_tree_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_impl.h" 5 #include "cc/trees/layer_tree_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 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 FindScrollingLayerFunctor(), 1677 FindScrollingLayerFunctor(),
1678 property_trees_.transform_tree, 1678 property_trees_.transform_tree,
1679 property_trees_.clip_tree, &data_for_recursion); 1679 property_trees_.clip_tree, &data_for_recursion);
1680 return data_for_recursion.closest_match; 1680 return data_for_recursion.closest_match;
1681 } 1681 }
1682 1682
1683 struct HitTestVisibleScrollableOrTouchableFunctor { 1683 struct HitTestVisibleScrollableOrTouchableFunctor {
1684 bool operator()(LayerImpl* layer) const { 1684 bool operator()(LayerImpl* layer) const {
1685 return layer->IsDrawnRenderSurfaceLayerListMember() || 1685 return layer->IsDrawnRenderSurfaceLayerListMember() ||
1686 ScrollsAnyDrawnRenderSurfaceLayerListMember(layer) || 1686 ScrollsAnyDrawnRenderSurfaceLayerListMember(layer) ||
1687 !layer->touch_event_handler_region().IsEmpty() || 1687 !layer->touch_event_handler_region().IsEmpty();
1688 layer->layer_tree_impl()->event_listener_properties(
1689 EventListenerClass::kMouseWheel) !=
1690 EventListenerProperties::kNone;
1691 } 1688 }
1692 }; 1689 };
1693 1690
1694 LayerImpl* LayerTreeImpl::FindLayerThatIsHitByPoint( 1691 LayerImpl* LayerTreeImpl::FindLayerThatIsHitByPoint(
1695 const gfx::PointF& screen_space_point) { 1692 const gfx::PointF& screen_space_point) {
1696 if (!root_layer()) 1693 if (!root_layer())
1697 return NULL; 1694 return NULL;
1698 bool update_lcd_text = false; 1695 bool update_lcd_text = false;
1699 if (!UpdateDrawProperties(update_lcd_text)) 1696 if (!UpdateDrawProperties(update_lcd_text))
1700 return NULL; 1697 return NULL;
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 const gfx::BoxF& box, 2033 const gfx::BoxF& box,
2037 gfx::BoxF* bounds) const { 2034 gfx::BoxF* bounds) const {
2038 *bounds = gfx::BoxF(); 2035 *bounds = gfx::BoxF();
2039 return layer_tree_host_impl_->animation_host() 2036 return layer_tree_host_impl_->animation_host()
2040 ? layer_tree_host_impl_->animation_host() 2037 ? layer_tree_host_impl_->animation_host()
2041 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) 2038 ->TransformAnimationBoundsForBox(layer->id(), box, bounds)
2042 : true; 2039 : true;
2043 } 2040 }
2044 2041
2045 } // namespace cc 2042 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698