OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 int m_offset; | 236 int m_offset; |
237 PositionAnchorType m_anchorType; | 237 PositionAnchorType m_anchorType; |
238 }; | 238 }; |
239 | 239 |
240 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingStrat
egy>; | 240 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingStrat
egy>; |
241 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingInCom
posedTreeStrategy>; | 241 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingInCom
posedTreeStrategy>; |
242 | 242 |
243 using Position = PositionAlgorithm<EditingStrategy>; | 243 using Position = PositionAlgorithm<EditingStrategy>; |
244 using PositionInComposedTree = PositionAlgorithm<EditingInComposedTreeStrategy>; | 244 using PositionInComposedTree = PositionAlgorithm<EditingInComposedTreeStrategy>; |
245 | 245 |
246 // TODO(yosin) |isRenderedCharacter()| should be removed, and we should use | |
247 // |VisiblePosition::characterAfter()| and |VisiblePosition::characterBefore()|. | |
248 // TODO(yosin) We should move |isRenderedCharacter()| to "VisibleUnits.cpp", | |
249 // since it is used only in "editing/commands/" | |
250 CORE_EXPORT bool isRenderedCharacter(const Position&); | |
251 | |
252 // TODO(yosin) We should make |parentEditingBoundary()| as static function | 246 // TODO(yosin) We should make |parentEditingBoundary()| as static function |
253 // in "VisibleUnits.cpp", since it is used only there. | 247 // in "VisibleUnits.cpp", since it is used only there. |
254 CORE_EXPORT Node* parentEditingBoundary(const Position&); | 248 CORE_EXPORT Node* parentEditingBoundary(const Position&); |
255 CORE_EXPORT Node* parentEditingBoundary(const PositionInComposedTree&); | 249 CORE_EXPORT Node* parentEditingBoundary(const PositionInComposedTree&); |
256 | 250 |
257 template <typename Strategy> | 251 template <typename Strategy> |
258 bool operator==(const PositionAlgorithm<Strategy>& a, const PositionAlgorithm<St
rategy>& b) | 252 bool operator==(const PositionAlgorithm<Strategy>& a, const PositionAlgorithm<St
rategy>& b) |
259 { | 253 { |
260 if (a.isNull()) | 254 if (a.isNull()) |
261 return b.isNull(); | 255 return b.isNull(); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 444 |
451 } // namespace blink | 445 } // namespace blink |
452 | 446 |
453 #ifndef NDEBUG | 447 #ifndef NDEBUG |
454 // Outside the WebCore namespace for ease of invocation from gdb. | 448 // Outside the WebCore namespace for ease of invocation from gdb. |
455 void showTree(const blink::Position&); | 449 void showTree(const blink::Position&); |
456 void showTree(const blink::Position*); | 450 void showTree(const blink::Position*); |
457 #endif | 451 #endif |
458 | 452 |
459 #endif // Position_h | 453 #endif // Position_h |
OLD | NEW |