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 EphemeralRange_h | 5 #ifndef EphemeralRange_h |
6 #define EphemeralRange_h | 6 #define EphemeralRange_h |
7 | 7 |
8 #include "core/editing/Position.h" | 8 #include "core/editing/Position.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 115 } |
116 bool isNotNull() const { return !isNull(); } | 116 bool isNotNull() const { return !isNull(); } |
117 | 117 |
118 RangeTraversal nodes() const; | 118 RangeTraversal nodes() const; |
119 | 119 |
120 // |node| should be in-document and valid for anchor node of | 120 // |node| should be in-document and valid for anchor node of |
121 // |PositionTemplate<Strategy>|. | 121 // |PositionTemplate<Strategy>|. |
122 static EphemeralRangeTemplate<Strategy> rangeOfContents( | 122 static EphemeralRangeTemplate<Strategy> rangeOfContents( |
123 const Node& /* node */); | 123 const Node& /* node */); |
124 | 124 |
| 125 void textQuads(Vector<FloatQuad>&) const; |
| 126 |
125 private: | 127 private: |
126 bool isValid() const; | 128 bool isValid() const; |
127 | 129 |
128 PositionTemplate<Strategy> m_startPosition; | 130 PositionTemplate<Strategy> m_startPosition; |
129 PositionTemplate<Strategy> m_endPosition; | 131 PositionTemplate<Strategy> m_endPosition; |
130 #if DCHECK_IS_ON() | 132 #if DCHECK_IS_ON() |
131 uint64_t m_domTreeVersion; | 133 uint64_t m_domTreeVersion; |
132 #endif | 134 #endif |
133 }; | 135 }; |
134 | 136 |
135 extern template class CORE_EXTERN_TEMPLATE_EXPORT | 137 extern template class CORE_EXTERN_TEMPLATE_EXPORT |
136 EphemeralRangeTemplate<EditingStrategy>; | 138 EphemeralRangeTemplate<EditingStrategy>; |
137 using EphemeralRange = EphemeralRangeTemplate<EditingStrategy>; | 139 using EphemeralRange = EphemeralRangeTemplate<EditingStrategy>; |
138 | 140 |
139 extern template class CORE_EXTERN_TEMPLATE_EXPORT | 141 extern template class CORE_EXTERN_TEMPLATE_EXPORT |
140 EphemeralRangeTemplate<EditingInFlatTreeStrategy>; | 142 EphemeralRangeTemplate<EditingInFlatTreeStrategy>; |
141 using EphemeralRangeInFlatTree = | 143 using EphemeralRangeInFlatTree = |
142 EphemeralRangeTemplate<EditingInFlatTreeStrategy>; | 144 EphemeralRangeTemplate<EditingInFlatTreeStrategy>; |
143 | 145 |
144 // Returns a newly created |Range| object from |range| or |nullptr| if | 146 // Returns a newly created |Range| object from |range| or |nullptr| if |
145 // |range.isNull()| returns true. | 147 // |range.isNull()| returns true. |
146 CORE_EXPORT Range* createRange(const EphemeralRange& /* range */); | 148 CORE_EXPORT Range* createRange(const EphemeralRange& /* range */); |
147 | 149 |
148 } // namespace blink | 150 } // namespace blink |
149 | 151 |
150 #endif | 152 #endif |
OLD | NEW |