Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.h

Issue 2404393003: Tie scroll anchoring adjustments to frame lifecycle instead of layout. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/core/frame/FrameView.h
diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h
index d8f183533b304cbc72c827789d3e7ae11255013c..b3599a1a4aff012cc36dcd6a98b24b14d8e39357 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.h
+++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -722,6 +722,8 @@ class CORE_EXPORT FrameView final
ScrollAnchor* scrollAnchor() override { return &m_scrollAnchor; }
void clearScrollAnchor();
bool shouldPerformScrollAnchoring() const override;
+ void enqueueScrollAnchoringAdjustment(ScrollableArea*);
+ void performScrollAnchoringAdjustments();
// For PaintInvalidator temporarily. TODO(wangxianzhu): Move into
// PaintInvalidator.
@@ -1058,6 +1060,9 @@ class CORE_EXPORT FrameView final
DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState;
ScrollAnchor m_scrollAnchor;
+ using AnchoringAdjustmentQueue =
+ HeapLinkedHashSet<WeakMember<ScrollableArea>>;
+ AnchoringAdjustmentQueue m_anchoringAdjustmentQueue;
bool m_needsScrollbarsUpdate;
bool m_suppressAdjustViewSize;

Powered by Google App Engine