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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.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: Add docs to Source/core/layout/README.md Created 4 years, 7 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/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 12f489202c52d6b429840b7777bd6fb20455b4a5..059ae5c56cd837daaecba9df25ae72258ef1403d 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -592,9 +592,8 @@ void PaintLayerScrollableArea::computeScrollDimensions()
m_overflowRect = box().layoutOverflowRect();
box().flipForWritingMode(m_overflowRect);
- int scrollableLeftOverflow = m_overflowRect.x() - box().borderLeft() - (box().shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? box().verticalScrollbarWidth() : 0);
- int scrollableTopOverflow = m_overflowRect.y() - box().borderTop();
- setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow));
+ LayoutPoint scrollableOverflow = m_overflowRect.location() - LayoutSize(box().borderLeft(), box().borderTop());
+ setScrollOrigin(flooredIntPoint(-scrollableOverflow) + box().originAdjustmentForScrollbars());
}
void PaintLayerScrollableArea::scrollToPosition(const DoublePoint& scrollPosition, ScrollOffsetClamping clamp, ScrollBehavior scrollBehavior, ScrollType scrollType)

Powered by Google App Engine
This is Rietveld 408576698