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

Unified Diff: cc/layers/layer_sticky_position_constraint.h

Issue 2401903002: Compute and include the offset of the sticky box to its enclosing composited layer. (Closed)
Patch Set: Merge with master and fix long line. Created 4 years, 2 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/layers/layer.cc ('k') | cc/layers/layer_sticky_position_constraint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_sticky_position_constraint.h
diff --git a/cc/layers/layer_sticky_position_constraint.h b/cc/layers/layer_sticky_position_constraint.h
index b575a23aa26bf1978baaf11a462c0818222e7af4..51a4da0c0b2853b00aded94e833f2dcfcf3f6b28 100644
--- a/cc/layers/layer_sticky_position_constraint.h
+++ b/cc/layers/layer_sticky_position_constraint.h
@@ -32,6 +32,11 @@ struct CC_EXPORT LayerStickyPositionConstraint {
float top_offset;
float bottom_offset;
+ // The layout offset of the sticky box relative to its containing layer.
+ // This is used to detect the sticky offset the main thread has applied
+ // to the layer.
+ gfx::Point parent_relative_sticky_box_offset;
+
// The rectangle corresponding to original layout position of the sticky box
// relative to the scroll ancestor. The sticky box is only offset once the
// scroll has passed its initial position (e.g. top_offset will only push
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_sticky_position_constraint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698