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

Unified Diff: cc/layers/layer_sticky_position_constraint.h

Issue 2733633002: Handle nested position:sticky elements correctly (compositor) (Closed)
Patch Set: Revert float changes to unittests too Created 3 years, 9 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
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 2082a2b2652d37983475f12728376f5d83110d54..adf053528f541aa570e23dd4ee477f006500e9be 100644
--- a/cc/layers/layer_sticky_position_constraint.h
+++ b/cc/layers/layer_sticky_position_constraint.h
@@ -7,6 +7,7 @@
#include "cc/cc_export.h"
+#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
namespace cc {
@@ -44,6 +45,16 @@ struct CC_EXPORT LayerStickyPositionConstraint {
// block boundary.
gfx::Rect scroll_container_relative_containing_block_rect;
+ // The nearest ancestor sticky layer ids that affect the sticky box constraint
+ // rect and the containing block constraint rect respectively. If no such
+ // layer exists, these are set to Layer::INVALID_ID.
+ int nearest_layer_shifting_sticky_box;
+ int nearest_layer_shifting_containing_block;
+
+ // Returns the nearest sticky ancestor layer, or Layer::INVALID_ID if no such
+ // layer exists.
+ int NearestStickyAncestor();
+
bool operator==(const LayerStickyPositionConstraint&) const;
bool operator!=(const LayerStickyPositionConstraint&) const;
};

Powered by Google App Engine
This is Rietveld 408576698