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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2524333003: Clamp scroll offset after overflow reclacs that are not layout inducing (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39afec388f4d7474c38c75129680c3a7ad0b2719..f9a41aa82fd84f187d44b94819405d2c7e38ccf8 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -784,7 +784,7 @@ void PaintLayerScrollableArea::updateAfterLayout() {
setHasVerticalScrollbar(false);
}
- clampScrollOffsetsAfterLayout();
+ clampScrollOffsetAfterOverflowChange();
if (!scrollbarsAreFrozen) {
updateScrollableAreaSet(hasScrollableHorizontalOverflow() ||
@@ -795,7 +795,7 @@ void PaintLayerScrollableArea::updateAfterLayout() {
positionOverflowControls();
}
-void PaintLayerScrollableArea::clampScrollOffsetsAfterLayout() {
+void PaintLayerScrollableArea::clampScrollOffsetAfterOverflowChange() {
// If a vertical scrollbar was removed, the min/max scroll offsets may have
// changed, so the scroll offsets needs to be clamped. If the scroll offset
// did not change, but the scroll origin *did* change, we still need to notify
@@ -990,6 +990,8 @@ void PaintLayerScrollableArea::updateAfterOverflowRecalc() {
box().setNeedsLayoutAndFullPaintInvalidation(
LayoutInvalidationReason::Unknown);
}
+
+ clampScrollOffsetAfterOverflowChange();
}
IntRect PaintLayerScrollableArea::rectForHorizontalScrollbar(
@@ -2003,7 +2005,7 @@ void PaintLayerScrollableArea::DelayScrollOffsetClampScope::setNeedsClamp(
void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
clampScrollableAreas() {
for (auto& scrollableArea : *s_needsClamp)
- scrollableArea->clampScrollOffsetsAfterLayout();
+ scrollableArea->clampScrollOffsetAfterOverflowChange();
delete s_needsClamp;
s_needsClamp = nullptr;
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698