| 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..dd0e52c4fd5797df3be0d16b1754374d2862467a 100644
|
| --- a/cc/layers/layer_sticky_position_constraint.h
|
| +++ b/cc/layers/layer_sticky_position_constraint.h
|
| @@ -7,7 +7,9 @@
|
|
|
| #include "cc/cc_export.h"
|
|
|
| -#include "ui/gfx/geometry/rect.h"
|
| +#include "ui/gfx/geometry/point_f.h"
|
| +#include "ui/gfx/geometry/rect_f.h"
|
| +#include "ui/gfx/geometry/vector2d_f.h"
|
|
|
| namespace cc {
|
|
|
| @@ -31,18 +33,28 @@ struct CC_EXPORT LayerStickyPositionConstraint {
|
| // 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;
|
| + gfx::PointF 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
|
| // the element down from its original position).
|
| - gfx::Rect scroll_container_relative_sticky_box_rect;
|
| + gfx::RectF scroll_container_relative_sticky_box_rect;
|
|
|
| // The layout rectangle of the sticky box's containing block relative to the
|
| // scroll ancestor. The sticky box is only moved as far as its containing
|
| // block boundary.
|
| - gfx::Rect scroll_container_relative_containing_block_rect;
|
| + gfx::RectF 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;
|
|
|