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