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

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

Issue 2123053002: Improve scroll anchoring's interactions with the visual viewport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix broken tests Created 4 years, 5 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 df5d4c45e3a8151374c8bae0c36cbc4fae4201ca..06ccf0bd6c38fe1c9c4bb7ce0a14c61aa18f2ae0 100644
--- a/third_party/WebKit/Source/core/layout/ScrollAnchor.h
+++ b/third_party/WebKit/Source/core/layout/ScrollAnchor.h
@@ -19,9 +19,17 @@ class CORE_EXPORT ScrollAnchor final {
DISALLOW_NEW();
public:
- ScrollAnchor(ScrollableArea*);
+ ScrollAnchor();
+ explicit ScrollAnchor(ScrollableArea*);
~ScrollAnchor();
+ // The scroller that is scrolled to componsate for layout movements. Note
+ // that the scroller can only be initialized once.
+ void setScroller(ScrollableArea*);
+
+ // Returns true if the underlying scroller is set.
+ bool hasScroller() const { return m_scroller; }
+
// The LayoutObject we are currently anchored to. Lazily computed during
// save() and cached until the next call to clear().
LayoutObject* anchorObject() const { return m_current.m_anchorObject; }
« no previous file with comments | « third_party/WebKit/Source/core/frame/VisualViewport.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