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

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

Issue 2394053004: Clear scroll anchor on all parent scrollers from ScrollAnchor::clear (Closed)
Patch Set: review comments Created 4 years, 2 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/ScrollAnchor.h
diff --git a/third_party/WebKit/Source/core/layout/ScrollAnchor.h b/third_party/WebKit/Source/core/layout/ScrollAnchor.h
index 865cabe05762f36a21d409c172928e19d73bc023..1490c6f7ef7f06e3afa93356ba1684003f07b758 100644
--- a/third_party/WebKit/Source/core/layout/ScrollAnchor.h
+++ b/third_party/WebKit/Source/core/layout/ScrollAnchor.h
@@ -34,8 +34,8 @@ class CORE_EXPORT ScrollAnchor final {
// save() and cached until the next call to clear().
LayoutObject* anchorObject() const { return m_anchorObject; }
- // Indicates that the next save() should compute a new anchor. (In certain
- // cases the previous anchor will be reused; see comments in restore.)
+ // Indicates that the next save() should compute a new anchor for the
+ // containing scroller and all ancestor scrollers.
void clear();
// Records the anchor's location in relation to the scroller. Should be
@@ -64,6 +64,10 @@ class CORE_EXPORT ScrollAnchor final {
DEFINE_INLINE_TRACE() { visitor->trace(m_scroller); }
private:
+ // Indicates that the next save() should compute a new anchor for the
+ // containing scroller.
+ void clearSelf(bool unconditionally = false);
+
void findAnchor();
bool computeScrollAnchorDisablingStyleChanged();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/ScrollAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698