| Index: third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
|
| diff --git a/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h b/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
|
| index 330d2d86334c79ac8050a50cc8565bc97c06bfeb..428531757cec98cfd1175c4089b07cf026a6d1cb 100644
|
| --- a/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
|
| +++ b/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
|
| @@ -7,11 +7,19 @@
|
|
|
| #include "platform/geometry/FloatRect.h"
|
| #include "platform/geometry/FloatSize.h"
|
| +#include "platform/wtf/HashMap.h"
|
|
|
| namespace blink {
|
|
|
| class LayoutBoxModelObject;
|
| +class PaintLayer;
|
| +class StickyPositionScrollingConstraints;
|
|
|
| +typedef WTF::HashMap<PaintLayer*, StickyPositionScrollingConstraints>
|
| + StickyConstraintsMap;
|
| +
|
| +// TODO(smcgruer): Add detailed comment explaining how
|
| +// StickyPositionScrollingConstraints works.
|
| class StickyPositionScrollingConstraints final {
|
| public:
|
| enum AnchorEdgeFlags {
|
| @@ -113,6 +121,11 @@ class StickyPositionScrollingConstraints final {
|
| return total_containing_block_sticky_offset_;
|
| }
|
|
|
| + // Returns the relative position of the sticky box and its original position
|
| + // before scroll. This method is only safe to call if ComputeStickyOffset has
|
| + // been invoked.
|
| + FloatSize GetOffsetForStickyPosition(const StickyConstraintsMap&) const;
|
| +
|
| const LayoutBoxModelObject* NearestStickyAncestor() const {
|
| // If we have one or more sticky ancestor elements between ourselves and our
|
| // containing block, |m_nearestStickyBoxShiftingStickyBox| points to the
|
|
|