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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2336923002: cc: Include viewport clip in visible rect of clip children (Closed)
Patch Set: comments Created 4 years, 3 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/draw_property_utils.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 3f4354c3611433bb998a224e53df87057861f9d6..5717c522625fc2ce0c95193852dbc7170f8b993c 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -6373,8 +6373,12 @@ TEST_F(LayerTreeHostCommonTest, ScrollChildAndScrollParentDifferentTargets) {
float device_scale_factor = 1.5f;
LayerImplList render_surface_layer_list_impl;
+ gfx::Size device_viewport_size =
+ gfx::Size(root->bounds().width() * device_scale_factor,
+ root->bounds().height() * device_scale_factor);
LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
- root, root->bounds(), gfx::Transform(), &render_surface_layer_list_impl);
+ root, device_viewport_size, gfx::Transform(),
+ &render_surface_layer_list_impl);
inputs.device_scale_factor = device_scale_factor;
LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs);
@@ -9148,7 +9152,7 @@ TEST_F(LayerTreeHostCommonTest, ClipChildVisibleRect) {
clip_parent->test_properties()->clip_children->insert(clip_child);
ExecuteCalculateDrawProperties(root);
- EXPECT_EQ(gfx::Rect(40, 40), clip_child->visible_layer_rect());
+ EXPECT_EQ(gfx::Rect(30, 30), clip_child->visible_layer_rect());
}
TEST_F(LayerTreeHostCommonTest,
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698