| 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 GranularityStrategy_h | 5 #ifndef GranularityStrategy_h |
| 6 #define GranularityStrategy_h | 6 #define GranularityStrategy_h |
| 7 | 7 |
| 8 #include "core/editing/SelectionStrategy.h" | 8 #include "core/editing/SelectionStrategy.h" |
| 9 #include "core/editing/VisibleSelection.h" | 9 #include "core/editing/VisibleSelection.h" |
| 10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // Last time the selection was changed by updateExtent - it was shrunk | 101 // Last time the selection was changed by updateExtent - it was shrunk |
| 102 // (without changing relative base/extent order). | 102 // (without changing relative base/extent order). |
| 103 Shrinking | 103 Shrinking |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 StrategyState m_state; | 106 StrategyState m_state; |
| 107 | 107 |
| 108 // Current selection granularity being used. | 108 // Current selection granularity being used. |
| 109 TextGranularity m_granularity; | 109 TextGranularity m_granularity; |
| 110 | 110 |
| 111 // Horizontal offset in pixels in absolute coordinates applied to the extent p
oint. | 111 // Horizontal offset in pixels in absolute coordinates applied to the extent |
| 112 // point. |
| 112 int m_offset; | 113 int m_offset; |
| 113 | 114 |
| 114 // This defines location of the offset-adjusted extent point (from the | 115 // This defines location of the offset-adjusted extent point (from the |
| 115 // latest updateExtent call) relative to the location of extent's | 116 // latest updateExtent call) relative to the location of extent's |
| 116 // VisiblePosition. It is used to detect sub-position extent movement. | 117 // VisiblePosition. It is used to detect sub-position extent movement. |
| 117 IntSize m_diffExtentPointFromExtentPosition; | 118 IntSize m_diffExtentPointFromExtentPosition; |
| 118 }; | 119 }; |
| 119 | 120 |
| 120 } // namespace blink | 121 } // namespace blink |
| 121 | 122 |
| 122 #endif // GranularityStrategy_h | 123 #endif // GranularityStrategy_h |
| OLD | NEW |