| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 extern template class CORE_EXTERN_TEMPLATE_EXPORT | 200 extern template class CORE_EXTERN_TEMPLATE_EXPORT |
| 201 VisibleSelectionTemplate<EditingStrategy>; | 201 VisibleSelectionTemplate<EditingStrategy>; |
| 202 extern template class CORE_EXTERN_TEMPLATE_EXPORT | 202 extern template class CORE_EXTERN_TEMPLATE_EXPORT |
| 203 VisibleSelectionTemplate<EditingInFlatTreeStrategy>; | 203 VisibleSelectionTemplate<EditingInFlatTreeStrategy>; |
| 204 | 204 |
| 205 using VisibleSelection = VisibleSelectionTemplate<EditingStrategy>; | 205 using VisibleSelection = VisibleSelectionTemplate<EditingStrategy>; |
| 206 using VisibleSelectionInFlatTree = | 206 using VisibleSelectionInFlatTree = |
| 207 VisibleSelectionTemplate<EditingInFlatTreeStrategy>; | 207 VisibleSelectionTemplate<EditingInFlatTreeStrategy>; |
| 208 | 208 |
| 209 // TODO(yosin): We should get rid of |createVisibleSelection()| overloads | |
| 210 // except for taking |SelectionInDOMTree| and |SelectionInFlatTree|. | |
| 211 CORE_EXPORT VisibleSelection createVisibleSelection(const SelectionInDOMTree&); | 209 CORE_EXPORT VisibleSelection createVisibleSelection(const SelectionInDOMTree&); |
| 212 CORE_EXPORT VisibleSelection | |
| 213 createVisibleSelection(const Position& base, | |
| 214 const Position& extent, | |
| 215 TextAffinity = SelDefaultAffinity, | |
| 216 bool isDirectional = false); | |
| 217 | |
| 218 CORE_EXPORT VisibleSelectionInFlatTree | 210 CORE_EXPORT VisibleSelectionInFlatTree |
| 219 createVisibleSelection(const SelectionInFlatTree&); | 211 createVisibleSelection(const SelectionInFlatTree&); |
| 220 | 212 |
| 221 // We don't yet support multi-range selections, so we only ever have one range | 213 // We don't yet support multi-range selections, so we only ever have one range |
| 222 // to return. | 214 // to return. |
| 223 CORE_EXPORT EphemeralRange firstEphemeralRangeOf(const VisibleSelection&); | 215 CORE_EXPORT EphemeralRange firstEphemeralRangeOf(const VisibleSelection&); |
| 224 | 216 |
| 225 // TODO(sof): move more firstRangeOf() uses to be over EphemeralRange instead. | 217 // TODO(sof): move more firstRangeOf() uses to be over EphemeralRange instead. |
| 226 CORE_EXPORT Range* firstRangeOf(const VisibleSelection&); | 218 CORE_EXPORT Range* firstRangeOf(const VisibleSelection&); |
| 227 | 219 |
| 228 CORE_EXPORT std::ostream& operator<<(std::ostream&, const VisibleSelection&); | 220 CORE_EXPORT std::ostream& operator<<(std::ostream&, const VisibleSelection&); |
| 229 CORE_EXPORT std::ostream& operator<<(std::ostream&, | 221 CORE_EXPORT std::ostream& operator<<(std::ostream&, |
| 230 const VisibleSelectionInFlatTree&); | 222 const VisibleSelectionInFlatTree&); |
| 231 | 223 |
| 232 } // namespace blink | 224 } // namespace blink |
| 233 | 225 |
| 234 #ifndef NDEBUG | 226 #ifndef NDEBUG |
| 235 // Outside the WebCore namespace for ease of invocation from gdb. | 227 // Outside the WebCore namespace for ease of invocation from gdb. |
| 236 void showTree(const blink::VisibleSelection&); | 228 void showTree(const blink::VisibleSelection&); |
| 237 void showTree(const blink::VisibleSelection*); | 229 void showTree(const blink::VisibleSelection*); |
| 238 void showTree(const blink::VisibleSelectionInFlatTree&); | 230 void showTree(const blink::VisibleSelectionInFlatTree&); |
| 239 void showTree(const blink::VisibleSelectionInFlatTree*); | 231 void showTree(const blink::VisibleSelectionInFlatTree*); |
| 240 #endif | 232 #endif |
| 241 | 233 |
| 242 #endif // VisibleSelection_h | 234 #endif // VisibleSelection_h |
| OLD | NEW |