Chromium Code Reviews| 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 84dab3cc2f76ad7170d18bed9235375e5dc16c62..c31d9e89ab371e497a0c2ca1fe1c5e82168651c9 100644 |
| --- a/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h |
| +++ b/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h |
| @@ -48,7 +48,8 @@ class StickyPositionScrollingConstraints final { |
| other.m_nearestStickyBoxShiftingContainingBlock), |
| m_totalStickyBoxStickyOffset(other.m_totalStickyBoxStickyOffset), |
| m_totalContainingBlockStickyOffset( |
| - other.m_totalContainingBlockStickyOffset) {} |
| + other.m_totalContainingBlockStickyOffset), |
| + m_localStickyOffset(other.m_localStickyOffset) {} |
| FloatSize computeStickyOffset( |
| const FloatRect& viewportRect, |
| @@ -113,6 +114,12 @@ class StickyPositionScrollingConstraints final { |
| return m_totalContainingBlockStickyOffset; |
| } |
| + const LayoutBoxModelObject* nearestStickyAncestor() const { |
| + return m_nearestStickyBoxShiftingStickyBox |
| + ? m_nearestStickyBoxShiftingStickyBox |
| + : m_nearestStickyBoxShiftingContainingBlock; |
| + } |
| + |
| bool operator==(const StickyPositionScrollingConstraints& other) const { |
| return m_leftOffset == other.m_leftOffset && |
| m_rightOffset == other.m_rightOffset && |
| @@ -128,7 +135,8 @@ class StickyPositionScrollingConstraints final { |
| other.m_nearestStickyBoxShiftingContainingBlock && |
| m_totalStickyBoxStickyOffset == other.m_totalStickyBoxStickyOffset && |
| m_totalContainingBlockStickyOffset == |
| - other.m_totalContainingBlockStickyOffset; |
| + other.m_totalContainingBlockStickyOffset && |
| + m_localStickyOffset == other.m_localStickyOffset; |
| } |
| bool operator!=(const StickyPositionScrollingConstraints& other) const { |
| @@ -163,6 +171,8 @@ class StickyPositionScrollingConstraints final { |
| // LayoutBoxModelObjectTest.cpp. |
| FloatSize m_totalStickyBoxStickyOffset; |
| FloatSize m_totalContainingBlockStickyOffset; |
| + |
| + FloatSize m_localStickyOffset; |
|
flackr
2017/03/17 15:01:56
This seems unused, remove it?
smcgruer
2017/03/17 17:36:52
Done.
|
| }; |
| } // namespace blink |