Index: third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp |
diff --git a/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp b/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp |
index f099cdce40417819ed11a11f133cdf54b503a75f..4e0987e22fa0f27b072855417f79e40cbf976fb0 100644 |
--- a/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp |
+++ b/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.cpp |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "core/page/scrolling/StickyPositionScrollingConstraints.h" |
+#include "core/paint/PaintLayer.h" |
namespace blink { |
@@ -88,4 +89,16 @@ FloatSize StickyPositionScrollingConstraints::ComputeStickyOffset( |
return sticky_offset; |
} |
+FloatSize StickyPositionScrollingConstraints::GetLocalStickyOffset( |
+ const StickyConstraintsMap& constraints_map) const { |
+ FloatSize nearest_sticky_box_shifting_sticky_box_constraints_offset; |
+ if (nearest_sticky_box_shifting_sticky_box_) { |
+ nearest_sticky_box_shifting_sticky_box_constraints_offset = |
+ constraints_map.at(nearest_sticky_box_shifting_sticky_box_->Layer()) |
+ .GetTotalStickyBoxStickyOffset(); |
+ } |
+ return total_sticky_box_sticky_offset_ - |
+ nearest_sticky_box_shifting_sticky_box_constraints_offset; |
+} |
+ |
} // namespace blink |