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

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

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: . 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.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.h b/third_party/WebKit/Source/core/layout/LayoutBlock.h
index c621c78145195ca30c53d77ea6996935f1e84276..9976558c884dca6e16369916f62c3515e8ddbcbd 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.h
@@ -341,8 +341,12 @@ protected:
// finishDelayUpdateScrollInfo() will do nothing until finishDelayUpdateScrollInfo()
// is called the same number of times.
// finishDelayUpdateScrollInfo returns true when it marked something for layout.
+ // It will also return a map of saved scroll positions that the caller should restore
+ // on the given scrollable areas after performing the layout.
+ // This can be necessary because Flexbox's multi-pass layout can lose the scroll position.
+ typedef WTF::HashMap<PaintLayerScrollableArea*, DoublePoint> ScrollPositionMap;
static void startDelayUpdateScrollInfo();
- static bool finishDelayUpdateScrollInfo(SubtreeLayoutScope*);
+ static bool finishDelayUpdateScrollInfo(SubtreeLayoutScope*, ScrollPositionMap*);
void updateScrollInfoAfterLayout();

Powered by Google App Engine
This is Rietveld 408576698