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

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

Issue 1846023003: Don't clamp scroll positions until the end of all layouts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back to original approach for landing, will do real fix separately Created 4 years, 9 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/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index 27e2f756b675aba83d5c954abd15e7b6acbff981..3888503172cc910d0def505c4b878ad79773f69e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -859,7 +859,7 @@ void LayoutBlock::startDelayUpdateScrollInfo()
++gDelayUpdateScrollInfo;
}
-bool LayoutBlock::finishDelayUpdateScrollInfo(SubtreeLayoutScope* layoutScope)
+bool LayoutBlock::finishDelayUpdateScrollInfo(SubtreeLayoutScope* layoutScope, ScrollPositionMap* scrollMap)
{
bool childrenMarkedForRelayout = false;
@@ -873,7 +873,10 @@ bool LayoutBlock::finishDelayUpdateScrollInfo(SubtreeLayoutScope* layoutScope)
for (auto* block : *infoSet) {
if (block->hasOverflowClip()) {
- childrenMarkedForRelayout |= block->layer()->getScrollableArea()->updateAfterLayout(layoutScope);
+ PaintLayerScrollableArea* scrollableArea = block->layer()->getScrollableArea();
+ if (scrollMap)
+ scrollMap->add(scrollableArea, scrollableArea->scrollPositionDouble());
+ childrenMarkedForRelayout |= scrollableArea->updateAfterLayout(layoutScope);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698