Chromium Code Reviews| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 | 103 |
| 104 // Location of m_layoutObject relative to scroller at time of save(). | 104 // Location of m_layoutObject relative to scroller at time of save(). |
| 105 LayoutPoint m_savedRelativeOffset; | 105 LayoutPoint m_savedRelativeOffset; |
| 106 | 106 |
| 107 // We suppress scroll anchoring after a style change on the anchor node or | 107 // We suppress scroll anchoring after a style change on the anchor node or |
| 108 // one of its ancestors, if that change might have caused the node to move. | 108 // one of its ancestors, if that change might have caused the node to move. |
| 109 // This bit tracks whether we have had a scroll-anchor-disabling style | 109 // This bit tracks whether we have had a scroll-anchor-disabling style |
| 110 // change since the last layout. It is recomputed in save(), and used to | 110 // change since the last layout. It is recomputed in save(), and used to |
| 111 // suppress the adjustment in restore(). More at http://bit.ly/sanaclap. | 111 // suppress the adjustment in restore(). More at http://bit.ly/sanaclap. |
| 112 bool m_scrollAnchorDisablingStyleChanged; | 112 bool m_scrollAnchorDisablingStyleChanged; |
| 113 | |
| 114 // True iff save has been called, and restore has not been called since | |
| 115 // the call to save. (In this state, additional calls to save are ignored.) | |
| 116 bool m_saved; | |
|
ojan
2016/09/01 05:39:48
Might be nice to explain that this is to deal with
skobes
2016/09/01 20:47:21
Done.
| |
| 113 }; | 117 }; |
| 114 | 118 |
| 115 } // namespace blink | 119 } // namespace blink |
| 116 | 120 |
| 117 #endif // ScrollAnchor_h | 121 #endif // ScrollAnchor_h |
| OLD | NEW |