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

Side by Side Diff: cc/layers/layer_position_constraint_unittest.cc

Issue 1144993004: cc: Make impl-thread property trees handle fixed-position layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@EnablePropertyTreeVerificationOnImpl
Patch Set: Add DCHECK Created 5 years, 6 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/layers/layer_impl.cc ('k') | cc/trees/layer_tree_impl.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/layers/layer_position_constraint.h" 5 #include "cc/layers/layer_position_constraint.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 // would still have to compensate with respect to its container. 968 // would still have to compensate with respect to its container.
969 969
970 // Add one more layer to the hierarchy for this test. 970 // Add one more layer to the hierarchy for this test.
971 scoped_refptr<Layer> great_great_grand_child = 971 scoped_refptr<Layer> great_great_grand_child =
972 make_scoped_refptr(new LayerWithForcedDrawsContent(layer_settings_)); 972 make_scoped_refptr(new LayerWithForcedDrawsContent(layer_settings_));
973 great_grand_child_->AddChild(great_great_grand_child); 973 great_grand_child_->AddChild(great_great_grand_child);
974 974
975 child_->SetIsContainerForFixedPositionLayers(true); 975 child_->SetIsContainerForFixedPositionLayers(true);
976 grand_child_->SetPositionConstraint(fixed_to_top_left_); 976 grand_child_->SetPositionConstraint(fixed_to_top_left_);
977 great_grand_child_->SetIsContainerForFixedPositionLayers(true); 977 great_grand_child_->SetIsContainerForFixedPositionLayers(true);
978 great_grand_child_->SetScrollClipLayerId(root_->id());
978 great_great_grand_child->SetPositionConstraint(fixed_to_top_left_); 979 great_great_grand_child->SetPositionConstraint(fixed_to_top_left_);
979 980
980 CommitAndUpdateImplPointers(); 981 CommitAndUpdateImplPointers();
981 982
982 LayerImpl* container1 = child_impl_; 983 LayerImpl* container1 = child_impl_;
983 LayerImpl* fixed_to_container1 = grand_child_impl_; 984 LayerImpl* fixed_to_container1 = grand_child_impl_;
984 LayerImpl* container2 = great_grand_child_impl_; 985 LayerImpl* container2 = great_grand_child_impl_;
985 LayerImpl* fixed_to_container2 = container2->children()[0]; 986 LayerImpl* fixed_to_container2 = container2->children()[0];
986 987
987 container1->SetScrollDelta(gfx::Vector2d(0, 15)); 988 container1->SetScrollDelta(gfx::Vector2d(0, 15));
(...skipping 21 matching lines...) Expand all
1009 1010
1010 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_container2_transform, 1011 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_container2_transform,
1011 container2->draw_transform()); 1012 container2->draw_transform());
1012 1013
1013 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_to_container2_transform, 1014 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_to_container2_transform,
1014 fixed_to_container2->draw_transform()); 1015 fixed_to_container2->draw_transform());
1015 } 1016 }
1016 1017
1017 } // namespace 1018 } // namespace
1018 } // namespace cc 1019 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698