OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 bool isBaseFirst() const { return m_baseIsFirst; } | 146 bool isBaseFirst() const { return m_baseIsFirst; } |
147 bool isDirectional() const { return m_isDirectional; } | 147 bool isDirectional() const { return m_isDirectional; } |
148 void setIsDirectional(bool isDirectional) { m_isDirectional = isDirectional;
} | 148 void setIsDirectional(bool isDirectional) { m_isDirectional = isDirectional;
} |
149 | 149 |
150 void appendTrailingWhitespace(); | 150 void appendTrailingWhitespace(); |
151 | 151 |
152 bool expandUsingGranularity(TextGranularity); | 152 bool expandUsingGranularity(TextGranularity); |
153 bool expandUsingGranularityInComposedTree(TextGranularity); | 153 bool expandUsingGranularityInComposedTree(TextGranularity); |
154 | 154 |
155 // We don't yet support multi-range selections, so we only ever have one ran
ge to return. | |
156 PassRefPtrWillBeRawPtr<Range> firstRange() const; | |
157 | |
158 bool intersectsNode(Node*) const; | 155 bool intersectsNode(Node*) const; |
159 | 156 |
160 // FIXME: Most callers probably don't want these functions, but | 157 // FIXME: Most callers probably don't want these functions, but |
161 // are using them for historical reasons. toNormalizedRange and | 158 // are using them for historical reasons. toNormalizedRange and |
162 // toNormalizedEphemeralRange contracts the range around text, and | 159 // toNormalizedEphemeralRange contracts the range around text, and |
163 // moves the caret upstream before returning the range/positions. | 160 // moves the caret upstream before returning the range/positions. |
164 PassRefPtrWillBeRawPtr<Range> toNormalizedRange() const; | 161 PassRefPtrWillBeRawPtr<Range> toNormalizedRange() const; |
165 EphemeralRange toNormalizedEphemeralRange() const; | 162 EphemeralRange toNormalizedEphemeralRange() const; |
166 static EphemeralRange normalizeRange(const EphemeralRange&); | 163 static EphemeralRange normalizeRange(const EphemeralRange&); |
167 static EphemeralRangeInComposedTree normalizeRange(const EphemeralRangeInCom
posedTree&); | 164 static EphemeralRangeInComposedTree normalizeRange(const EphemeralRangeInCom
posedTree&); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 // Oilpan: this reference has a lifetime that is at least as long | 247 // Oilpan: this reference has a lifetime that is at least as long |
251 // as this object. | 248 // as this object. |
252 RawPtrWillBeMember<ChangeObserver> m_changeObserver; | 249 RawPtrWillBeMember<ChangeObserver> m_changeObserver; |
253 | 250 |
254 // these are cached, can be recalculated by validate() | 251 // these are cached, can be recalculated by validate() |
255 SelectionType m_selectionType; // None, Caret, Range | 252 SelectionType m_selectionType; // None, Caret, Range |
256 bool m_baseIsFirst : 1; // True if base is before the extent | 253 bool m_baseIsFirst : 1; // True if base is before the extent |
257 bool m_isDirectional : 1; // Non-directional ignores m_baseIsFirst and selec
tion always extends on shift + arrow key. | 254 bool m_isDirectional : 1; // Non-directional ignores m_baseIsFirst and selec
tion always extends on shift + arrow key. |
258 }; | 255 }; |
259 | 256 |
| 257 // We don't yet support multi-range selections, so we only ever have one range |
| 258 // to return. |
| 259 CORE_EXPORT PassRefPtrWillBeRawPtr<Range> firstRangeOf(const VisibleSelection&); |
| 260 |
260 } // namespace blink | 261 } // namespace blink |
261 | 262 |
262 #ifndef NDEBUG | 263 #ifndef NDEBUG |
263 // Outside the WebCore namespace for ease of invocation from gdb. | 264 // Outside the WebCore namespace for ease of invocation from gdb. |
264 void showTree(const blink::VisibleSelection&); | 265 void showTree(const blink::VisibleSelection&); |
265 void showTree(const blink::VisibleSelection*); | 266 void showTree(const blink::VisibleSelection*); |
266 #endif | 267 #endif |
267 | 268 |
268 #endif // VisibleSelection_h | 269 #endif // VisibleSelection_h |
OLD | NEW |