| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 bool isBaseFirst() const { return m_baseIsFirst; } | 147 bool isBaseFirst() const { return m_baseIsFirst; } |
| 148 bool isDirectional() const { return m_isDirectional; } | 148 bool isDirectional() const { return m_isDirectional; } |
| 149 void setIsDirectional(bool isDirectional) { m_isDirectional = isDirectional;
} | 149 void setIsDirectional(bool isDirectional) { m_isDirectional = isDirectional;
} |
| 150 | 150 |
| 151 void appendTrailingWhitespace(); | 151 void appendTrailingWhitespace(); |
| 152 | 152 |
| 153 bool expandUsingGranularity(TextGranularity); | 153 bool expandUsingGranularity(TextGranularity); |
| 154 bool expandUsingGranularityInComposedTree(TextGranularity); | 154 bool expandUsingGranularityInComposedTree(TextGranularity); |
| 155 | 155 |
| 156 bool intersectsNode(Node*) const; | |
| 157 | |
| 158 // TODO(yosin) Most callers probably don't want these functions, but | 156 // TODO(yosin) Most callers probably don't want these functions, but |
| 159 // are using them for historical reasons. |toNormalizedEphemeralRange()| | 157 // are using them for historical reasons. |toNormalizedEphemeralRange()| |
| 160 // contracts the range around text, and moves the caret most backward | 158 // contracts the range around text, and moves the caret most backward |
| 161 // visually equivalent position before returning the range/positions. | 159 // visually equivalent position before returning the range/positions. |
| 162 EphemeralRange toNormalizedEphemeralRange() const; | 160 EphemeralRange toNormalizedEphemeralRange() const; |
| 163 static EphemeralRange normalizeRange(const EphemeralRange&); | 161 static EphemeralRange normalizeRange(const EphemeralRange&); |
| 164 static EphemeralRangeInComposedTree normalizeRange(const EphemeralRangeInCom
posedTree&); | 162 static EphemeralRangeInComposedTree normalizeRange(const EphemeralRangeInCom
posedTree&); |
| 165 | 163 |
| 166 Element* rootEditableElement() const; | 164 Element* rootEditableElement() const; |
| 167 bool isContentEditable() const; | 165 bool isContentEditable() const; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // these are cached, can be recalculated by validate() | 249 // these are cached, can be recalculated by validate() |
| 252 SelectionType m_selectionType; // None, Caret, Range | 250 SelectionType m_selectionType; // None, Caret, Range |
| 253 bool m_baseIsFirst : 1; // True if base is before the extent | 251 bool m_baseIsFirst : 1; // True if base is before the extent |
| 254 bool m_isDirectional : 1; // Non-directional ignores m_baseIsFirst and selec
tion always extends on shift + arrow key. | 252 bool m_isDirectional : 1; // Non-directional ignores m_baseIsFirst and selec
tion always extends on shift + arrow key. |
| 255 }; | 253 }; |
| 256 | 254 |
| 257 // We don't yet support multi-range selections, so we only ever have one range | 255 // We don't yet support multi-range selections, so we only ever have one range |
| 258 // to return. | 256 // to return. |
| 259 CORE_EXPORT PassRefPtrWillBeRawPtr<Range> firstRangeOf(const VisibleSelection&); | 257 CORE_EXPORT PassRefPtrWillBeRawPtr<Range> firstRangeOf(const VisibleSelection&); |
| 260 | 258 |
| 259 // TODO(yosin) We should move |intersectsNode()| to "FrameSelection.cpp". |
| 260 bool intersectsNode(const VisibleSelection&, Node*); |
| 261 |
| 261 } // namespace blink | 262 } // namespace blink |
| 262 | 263 |
| 263 #ifndef NDEBUG | 264 #ifndef NDEBUG |
| 264 // Outside the WebCore namespace for ease of invocation from gdb. | 265 // Outside the WebCore namespace for ease of invocation from gdb. |
| 265 void showTree(const blink::VisibleSelection&); | 266 void showTree(const blink::VisibleSelection&); |
| 266 void showTree(const blink::VisibleSelection*); | 267 void showTree(const blink::VisibleSelection*); |
| 267 #endif | 268 #endif |
| 268 | 269 |
| 269 #endif // VisibleSelection_h | 270 #endif // VisibleSelection_h |
| OLD | NEW |