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

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

Issue 1921553008: Fix scroll origin, overflow rects, and coordinate flipping for flexbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Split flexbox refactor into separate CL Created 4 years, 8 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index ffbe2f18715c4a113784f356381cfaaaeb5d4743..b95e3ca9cb4cc3008aff63786b298184f3d6995c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -955,7 +955,11 @@ IntSize LayoutBox::scrolledContentOffset() const
ASSERT(hasOverflowClip());
ASSERT(hasLayer());
// FIXME: Return DoubleSize here. crbug.com/414283.
- return flooredIntSize(getScrollableArea()->scrollOffset());
+ PaintLayerScrollableArea* scrollableArea = getScrollableArea();
+ IntSize result = flooredIntSize(scrollableArea->scrollOffset()) + scrollableArea->originAdjustmentForScrollbars();
+ if (isHorizontalWritingMode() && shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
leviw_travelin_and_unemployed 2016/04/28 22:12:12 Probably deserves a comment.
+ result.expand(-verticalScrollbarWidth(), 0);
+ return result;
}
bool LayoutBox::mapScrollingContentsRectToBoxSpace(LayoutRect& rect, ApplyOverflowClipFlag applyOverflowClip, VisualRectFlags visualRectFlags) const

Powered by Google App Engine
This is Rietveld 408576698