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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 template<typename Strategy> | 131 template<typename Strategy> |
132 void init(const PositionAlgorithm<Strategy>&, TextAffinity); | 132 void init(const PositionAlgorithm<Strategy>&, TextAffinity); |
133 | 133 |
134 Position leftVisuallyDistinctCandidate() const; | 134 Position leftVisuallyDistinctCandidate() const; |
135 Position rightVisuallyDistinctCandidate() const; | 135 Position rightVisuallyDistinctCandidate() const; |
136 | 136 |
137 Position m_deepPosition; | 137 Position m_deepPosition; |
138 TextAffinity m_affinity; | 138 TextAffinity m_affinity; |
139 }; | 139 }; |
140 | 140 |
141 // TODO(yosin) We should move |computeInlineBoxPosition()| to "VisibleUnits.h" | |
142 // with |Position| version. | |
143 inline InlineBoxPosition computeInlineBoxPosition(const VisiblePosition& positio
n) | |
144 { | |
145 return computeInlineBoxPosition(position.deepEquivalent(), position.affinity
()); | |
146 } | |
147 | |
148 EphemeralRange makeRange(const VisiblePosition&, const VisiblePosition&); | 141 EphemeralRange makeRange(const VisiblePosition&, const VisiblePosition&); |
149 | 142 |
150 CORE_EXPORT Position canonicalPositionOf(const Position&); | 143 CORE_EXPORT Position canonicalPositionOf(const Position&); |
151 CORE_EXPORT PositionInComposedTree canonicalPositionOf(const PositionInComposedT
ree&); | 144 CORE_EXPORT PositionInComposedTree canonicalPositionOf(const PositionInComposedT
ree&); |
152 PositionWithAffinity honorEditingBoundaryAtOrBeforeOf(const PositionWithAffinity
&, const Position& anchor); | 145 PositionWithAffinity honorEditingBoundaryAtOrBeforeOf(const PositionWithAffinity
&, const Position& anchor); |
153 PositionInComposedTreeWithAffinity honorEditingBoundaryAtOrBeforeOf(const Positi
onInComposedTreeWithAffinity&, const PositionInComposedTree& anchor); | 146 PositionInComposedTreeWithAffinity honorEditingBoundaryAtOrBeforeOf(const Positi
onInComposedTreeWithAffinity&, const PositionInComposedTree& anchor); |
154 | 147 |
155 } // namespace blink | 148 } // namespace blink |
156 | 149 |
157 #ifndef NDEBUG | 150 #ifndef NDEBUG |
158 // Outside the WebCore namespace for ease of invocation from gdb. | 151 // Outside the WebCore namespace for ease of invocation from gdb. |
159 void showTree(const blink::VisiblePosition*); | 152 void showTree(const blink::VisiblePosition*); |
160 void showTree(const blink::VisiblePosition&); | 153 void showTree(const blink::VisiblePosition&); |
161 #endif | 154 #endif |
162 | 155 |
163 #endif // VisiblePosition_h | 156 #endif // VisiblePosition_h |
OLD | NEW |