OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 private: | 103 private: |
104 explicit VisiblePosition(const Position&, TextAffinity); | 104 explicit VisiblePosition(const Position&, TextAffinity); |
105 | 105 |
106 // TODO(yosin) We should use |PositionWithAffinity| to make | 106 // TODO(yosin) We should use |PositionWithAffinity| to make |
107 // |toPositionWithAffinity()| simpler. | 107 // |toPositionWithAffinity()| simpler. |
108 Position m_deepPosition; | 108 Position m_deepPosition; |
109 TextAffinity m_affinity; | 109 TextAffinity m_affinity; |
110 }; | 110 }; |
111 | 111 |
112 // TODO(yosin) We should move |honorEditingBoundaryAtOr{Before,After} to | |
113 // "VisibleUnits.cpp" as static function. | |
114 // next() and previous() will increment/decrement by a character cluster. | |
115 VisiblePosition honorEditingBoundaryAtOrBefore(const VisiblePosition&, const Pos
ition& anchor); | |
116 PositionWithAffinity honorEditingBoundaryAtOrBeforeOf(const PositionWithAffinity
&, const Position& anchor); | |
117 PositionInComposedTreeWithAffinity honorEditingBoundaryAtOrBeforeOf(const Positi
onInComposedTreeWithAffinity&, const PositionInComposedTree& anchor); | |
118 VisiblePosition honorEditingBoundaryAtOrAfter(const VisiblePosition&, const Posi
tion& anchor); | |
119 | |
120 CORE_EXPORT VisiblePosition createVisiblePosition(const Position&, TextAffinity
= VP_DEFAULT_AFFINITY); | 112 CORE_EXPORT VisiblePosition createVisiblePosition(const Position&, TextAffinity
= VP_DEFAULT_AFFINITY); |
121 CORE_EXPORT VisiblePosition createVisiblePosition(const PositionWithAffinity&); | 113 CORE_EXPORT VisiblePosition createVisiblePosition(const PositionWithAffinity&); |
122 CORE_EXPORT VisiblePosition createVisiblePosition(const PositionInComposedTree&,
TextAffinity = VP_DEFAULT_AFFINITY); | 114 CORE_EXPORT VisiblePosition createVisiblePosition(const PositionInComposedTree&,
TextAffinity = VP_DEFAULT_AFFINITY); |
123 | 115 |
124 } // namespace blink | 116 } // namespace blink |
125 | 117 |
126 #ifndef NDEBUG | 118 #ifndef NDEBUG |
127 // Outside the WebCore namespace for ease of invocation from gdb. | 119 // Outside the WebCore namespace for ease of invocation from gdb. |
128 void showTree(const blink::VisiblePosition*); | 120 void showTree(const blink::VisiblePosition*); |
129 void showTree(const blink::VisiblePosition&); | 121 void showTree(const blink::VisiblePosition&); |
130 #endif | 122 #endif |
131 | 123 |
132 #endif // VisiblePosition_h | 124 #endif // VisiblePosition_h |
OLD | NEW |