OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/page/scrolling/StickyPositionScrollingConstraints.h" | 5 #include "core/page/scrolling/StickyPositionScrollingConstraints.h" |
6 | 6 |
7 namespace blink { | 7 namespace blink { |
8 | 8 |
9 FloatSize StickyPositionScrollingConstraints::computeStickyOffset( | 9 FloatSize StickyPositionScrollingConstraints::computeStickyOffset( |
10 const FloatRect& viewportRect, | 10 const FloatRect& viewportRect, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 boxRect.move(0, topDelta); | 74 boxRect.move(0, topDelta); |
75 } | 75 } |
76 | 76 |
77 FloatSize stickyOffset = boxRect.location() - stickyBoxRect.location(); | 77 FloatSize stickyOffset = boxRect.location() - stickyBoxRect.location(); |
78 | 78 |
79 m_totalStickyBoxStickyOffset = ancestorStickyBoxOffset + stickyOffset; | 79 m_totalStickyBoxStickyOffset = ancestorStickyBoxOffset + stickyOffset; |
80 m_totalContainingBlockStickyOffset = | 80 m_totalContainingBlockStickyOffset = |
81 ancestorStickyBoxOffset + ancestorContainingBlockOffset + stickyOffset; | 81 ancestorStickyBoxOffset + ancestorContainingBlockOffset + stickyOffset; |
82 | 82 |
| 83 m_localStickyOffset = stickyOffset; |
| 84 |
83 return stickyOffset; | 85 return stickyOffset; |
84 } | 86 } |
85 | 87 |
86 } // namespace blink | 88 } // namespace blink |
OLD | NEW |