Chromium Code Reviews| 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..eff281568cd7fd2842e6624438be1e98bc1a6063 100644 |
| --- a/third_party/WebKit/Source/core/layout/ScrollAnchor.h |
| +++ b/third_party/WebKit/Source/core/layout/ScrollAnchor.h |
| @@ -34,10 +34,14 @@ 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 (In certain cases the |
|
skobes
2016/10/10 21:34:35
You can delete the sentence in parentheses, it's a
|
| + // previous anchor will be reused; see comments in restore.) |
| void clear(); |
| + // Sets the anchor object to null. |
| + void releaseAnchor(); |
| + |
| // Records the anchor's location in relation to the scroller. Should be |
| // called when the scroller is about to be laid out. |
| void save(); |
| @@ -58,12 +62,13 @@ class CORE_EXPORT ScrollAnchor final { |
| // Checks if we hold any references to the specified object. |
| bool refersTo(const LayoutObject*) const; |
| - // Notifies us that an object will be removed from the layout tree. |
| - void notifyRemoved(LayoutObject*); |
| - |
| DEFINE_INLINE_TRACE() { visitor->trace(m_scroller); } |
| private: |
| + // Indicates that the next save() should compute a new anchor just for the |
| + // containing scroller. |
| + void clearForContainingScroller(); |
| + |
| void findAnchor(); |
| bool computeScrollAnchorDisablingStyleChanged(); |