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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 250663003: Relax touch hit testing in CC to look at all layers under a point (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit test case Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 920279eac1bc6f0d46d8dad68788cdcb30818347..7896a2271a8b504a638929f1717e650db5bf087d 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -6026,20 +6026,11 @@ TEST_F(LayerTreeHostCommonTest,
LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(
test_point, render_surface_layer_list);
- // In this case we should abort searching for touch handlers at the opaque
- // occluder and not find the region behind it.
- EXPECT_FALSE(result_layer);
-
- host_impl.active_tree()->LayerById(1234)->SetContentsOpaque(true);
- host_impl.active_tree()->LayerById(1234)->SetScrollClipLayer(1);
-
- result_layer =
- LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(
- test_point, render_surface_layer_list);
-
- // In this case we should abort searching for touch handlers at the scroller
- // (which is opaque to hit testing) and not find the region behind it.
- EXPECT_FALSE(result_layer);
+ // Even with an opaque layer in the middle, we should still find the layer
+ // with
+ // the touch handler behind it (since we can't assume that opaque layers are
+ // opaque to hit testing).
+ EXPECT_TRUE(result_layer);
test_point = gfx::Point(35, 15);
result_layer =
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698