| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 int m_offset; | 231 int m_offset; |
| 232 PositionAnchorType m_anchorType; | 232 PositionAnchorType m_anchorType; |
| 233 }; | 233 }; |
| 234 | 234 |
| 235 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingStrat
egy>; | 235 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingStrat
egy>; |
| 236 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingInCom
posedTreeStrategy>; | 236 extern template class CORE_EXTERN_TEMPLATE_EXPORT PositionAlgorithm<EditingInCom
posedTreeStrategy>; |
| 237 | 237 |
| 238 using Position = PositionAlgorithm<EditingStrategy>; | 238 using Position = PositionAlgorithm<EditingStrategy>; |
| 239 using PositionInComposedTree = PositionAlgorithm<EditingInComposedTreeStrategy>; | 239 using PositionInComposedTree = PositionAlgorithm<EditingInComposedTreeStrategy>; |
| 240 | 240 |
| 241 // TODO(yosin) We should make |parentEditingBoundary()| as static function | |
| 242 // in "VisibleUnits.cpp", since it is used only there. | |
| 243 CORE_EXPORT Node* parentEditingBoundary(const Position&); | |
| 244 CORE_EXPORT Node* parentEditingBoundary(const PositionInComposedTree&); | |
| 245 | |
| 246 template <typename Strategy> | 241 template <typename Strategy> |
| 247 bool operator==(const PositionAlgorithm<Strategy>& a, const PositionAlgorithm<St
rategy>& b) | 242 bool operator==(const PositionAlgorithm<Strategy>& a, const PositionAlgorithm<St
rategy>& b) |
| 248 { | 243 { |
| 249 if (a.isNull()) | 244 if (a.isNull()) |
| 250 return b.isNull(); | 245 return b.isNull(); |
| 251 | 246 |
| 252 if (a.anchorNode() != b.anchorNode() || a.anchorType() != b.anchorType()) | 247 if (a.anchorNode() != b.anchorNode() || a.anchorType() != b.anchorType()) |
| 253 return false; | 248 return false; |
| 254 | 249 |
| 255 if (!a.isOffsetInAnchor()) { | 250 if (!a.isOffsetInAnchor()) { |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 438 |
| 444 } // namespace blink | 439 } // namespace blink |
| 445 | 440 |
| 446 #ifndef NDEBUG | 441 #ifndef NDEBUG |
| 447 // Outside the WebCore namespace for ease of invocation from gdb. | 442 // Outside the WebCore namespace for ease of invocation from gdb. |
| 448 void showTree(const blink::Position&); | 443 void showTree(const blink::Position&); |
| 449 void showTree(const blink::Position*); | 444 void showTree(const blink::Position*); |
| 450 #endif | 445 #endif |
| 451 | 446 |
| 452 #endif // Position_h | 447 #endif // Position_h |
| OLD | NEW |