| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ScrollAnchor_h | 5 #ifndef ScrollAnchor_h |
| 6 #define ScrollAnchor_h | 6 #define ScrollAnchor_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/geometry/LayoutPoint.h" | 9 #include "platform/geometry/LayoutPoint.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // Checks if we hold any references to the specified object. | 61 // Checks if we hold any references to the specified object. |
| 62 bool refersTo(const LayoutObject*) const; | 62 bool refersTo(const LayoutObject*) const; |
| 63 | 63 |
| 64 // Notifies us that an object will be removed from the layout tree. | 64 // Notifies us that an object will be removed from the layout tree. |
| 65 void notifyRemoved(LayoutObject*); | 65 void notifyRemoved(LayoutObject*); |
| 66 | 66 |
| 67 DEFINE_INLINE_TRACE() { visitor->trace(m_scroller); } | 67 DEFINE_INLINE_TRACE() { visitor->trace(m_scroller); } |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 void findAnchor(); | 70 void findAnchor(); |
| 71 // Returns true if searching should stop. Stores result in m_anchorObject. |
| 72 bool findAnchorRecursive(LayoutObject*); |
| 71 bool computeScrollAnchorDisablingStyleChanged(); | 73 bool computeScrollAnchorDisablingStyleChanged(); |
| 72 | 74 |
| 73 enum WalkStatus { Skip = 0, Constrain, Continue, Return }; | 75 enum WalkStatus { Skip = 0, Constrain, Continue, Return }; |
| 74 struct ExamineResult { | 76 struct ExamineResult { |
| 75 ExamineResult(WalkStatus s) | 77 ExamineResult(WalkStatus s) |
| 76 : status(s), viable(false), corner(Corner::TopLeft) {} | 78 : status(s), viable(false), corner(Corner::TopLeft) {} |
| 77 | 79 |
| 78 ExamineResult(WalkStatus s, Corner c) | 80 ExamineResult(WalkStatus s, Corner c) |
| 79 : status(s), viable(true), corner(c) {} | 81 : status(s), viable(true), corner(c) {} |
| 80 | 82 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 109 bool m_scrollAnchorDisablingStyleChanged; | 111 bool m_scrollAnchorDisablingStyleChanged; |
| 110 | 112 |
| 111 // True iff an adjustment check has been queued with the FrameView but not yet | 113 // True iff an adjustment check has been queued with the FrameView but not yet |
| 112 // performed. | 114 // performed. |
| 113 bool m_queued; | 115 bool m_queued; |
| 114 }; | 116 }; |
| 115 | 117 |
| 116 } // namespace blink | 118 } // namespace blink |
| 117 | 119 |
| 118 #endif // ScrollAnchor_h | 120 #endif // ScrollAnchor_h |
| OLD | NEW |