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

Unified Diff: cc/trees/property_tree.cc

Issue 2486393006: Include the source_to_parent offset when removing offset applied by main. (Closed)
Patch Set: Add unit test LayerTreeHostCommonTest.StickyPositionTopScrollParent Created 4 years, 1 month 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
Index: cc/trees/property_tree.cc
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index a572211abc73628963546b4121173a388ef50eb3..c79cace6c5b2ed7e407370691d73b82d6cfcfaa0 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -474,7 +474,7 @@ gfx::Vector2dF StickyPositionOffset(TransformTree* tree, TransformNode* node) {
top_delta = available_space;
sticky_offset.set_y(sticky_offset.y() + top_delta);
}
- return sticky_offset - layer_offset -
+ return sticky_offset - layer_offset - node->source_to_parent -
constraint.scroll_container_relative_sticky_box_rect
.OffsetFromOrigin();
}

Powered by Google App Engine
This is Rietveld 408576698