Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index b0f3799611072834c4350877cedd407ccfc88ef2..daaf53b0b55fbe4d0833058a8b3e64f8b94e2730 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -784,10 +784,9 @@ void LayoutBoxModelObject::updateStickyPositionConstraints() const {
// The sticky position constraint rects should be independent of the current scroll position, so after
// mapping we add in the scroll position to get the container's position within the ancestor scroller's
// unscrolled layout overflow.
- FloatSize scrollOffset(
+ ScrollOffset scrollOffset(
scrollAncestor
- ? toFloatSize(
- scrollAncestor->getScrollableArea()->adjustedScrollOffset())
+ ? toFloatSize(scrollAncestor->getScrollableArea()->scrollPosition())
: FloatSize());
scrollContainerRelativePaddingBoxRect.move(scrollOffset);
}
@@ -908,7 +907,7 @@ FloatRect LayoutBoxModelObject::computeStickyConstrainingRect() const {
FloatRect constrainingRect;
constrainingRect =
FloatRect(enclosingClippingBox->overflowClipRect(LayoutPoint(DoublePoint(
- enclosingClippingBox->getScrollableArea()->adjustedScrollOffset()))));
+ enclosingClippingBox->getScrollableArea()->scrollPosition()))));
constrainingRect.move(enclosingClippingBox->paddingLeft(),
enclosingClippingBox->paddingTop());
constrainingRect.contract(

Powered by Google App Engine
This is Rietveld 408576698