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

Unified Diff: cc/trees/property_tree.cc

Issue 2929873002: Shifting layer position for sticky element to avoid passing unnessary variable to cc (Closed)
Patch Set: Bug fix Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree.cc
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index fc84ecf1d49bf660b448dad350f14ce47e6fa06e..ee3153341d0b515c281cd4f76d60bc900b106280 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -353,6 +353,8 @@ bool TransformTree::CombineInversesBetween(int source_id,
return all_are_invertible;
}
+// This function should match the offset we set for sticky position layer in
+// CompositedLayerMapping::UpdateMainGraphicsLayerGeometry.
gfx::Vector2dF StickyPositionOffset(TransformTree* tree, TransformNode* node) {
if (node->sticky_position_constraint_id == -1)
return gfx::Vector2dF();
@@ -461,7 +463,7 @@ gfx::Vector2dF StickyPositionOffset(TransformTree* tree, TransformNode* node) {
ancestor_sticky_box_offset + ancestor_containing_block_offset +
sticky_offset;
- return sticky_offset - node->offset_for_sticky_position_from_main_thread;
+ return sticky_offset;
}
void TransformTree::UpdateLocalTransform(TransformNode* node) {
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698