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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 { | 178 { |
179 return Position::firstPositionInOrBeforeNode(node); | 179 return Position::firstPositionInOrBeforeNode(node); |
180 } | 180 } |
181 | 181 |
182 inline Position lastPositionInOrAfterNode(Node* node) | 182 inline Position lastPositionInOrAfterNode(Node* node) |
183 { | 183 { |
184 return Position::lastPositionInOrAfterNode(node); | 184 return Position::lastPositionInOrAfterNode(node); |
185 } | 185 } |
186 | 186 |
187 CORE_EXPORT Position firstEditablePositionAfterPositionInRoot(const Position&, N
ode*); | 187 CORE_EXPORT Position firstEditablePositionAfterPositionInRoot(const Position&, N
ode*); |
188 Position lastEditablePositionBeforePositionInRoot(const Position&, Node*); | 188 CORE_EXPORT Position lastEditablePositionBeforePositionInRoot(const Position&, N
ode*); |
189 CORE_EXPORT PositionInComposedTree firstEditablePositionAfterPositionInRoot(cons
t PositionInComposedTree&, Node*); | 189 CORE_EXPORT PositionInComposedTree firstEditablePositionAfterPositionInRoot(cons
t PositionInComposedTree&, Node*); |
190 PositionInComposedTree lastEditablePositionBeforePositionInRoot(const PositionIn
ComposedTree&, Node*); | 190 CORE_EXPORT PositionInComposedTree lastEditablePositionBeforePositionInRoot(cons
t PositionInComposedTree&, Node*); |
191 | 191 |
192 // Move up or down the DOM by one position. | 192 // Move up or down the DOM by one position. |
193 // Offsets are computed using layout text for nodes that have layoutObjects - | 193 // Offsets are computed using layout text for nodes that have layoutObjects - |
194 // but note that even when using composed characters, the result may be inside | 194 // but note that even when using composed characters, the result may be inside |
195 // a single user-visible character if a ligature is formed. | 195 // a single user-visible character if a ligature is formed. |
196 CORE_EXPORT Position previousPositionOf(const Position&, PositionMoveType); | 196 CORE_EXPORT Position previousPositionOf(const Position&, PositionMoveType); |
197 CORE_EXPORT Position nextPositionOf(const Position&, PositionMoveType); | 197 CORE_EXPORT Position nextPositionOf(const Position&, PositionMoveType); |
198 CORE_EXPORT PositionInComposedTree previousPositionOf(const PositionInComposedTr
ee&, PositionMoveType); | 198 CORE_EXPORT PositionInComposedTree previousPositionOf(const PositionInComposedTr
ee&, PositionMoveType); |
199 CORE_EXPORT PositionInComposedTree nextPositionOf(const PositionInComposedTree&,
PositionMoveType); | 199 CORE_EXPORT PositionInComposedTree nextPositionOf(const PositionInComposedTree&,
PositionMoveType); |
200 | 200 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 // ------------------------------------------------------------------------- | 236 // ------------------------------------------------------------------------- |
237 | 237 |
238 // Functions returning VisiblePosition | 238 // Functions returning VisiblePosition |
239 | 239 |
240 // TODO(yosin) We should rename | 240 // TODO(yosin) We should rename |
241 // |firstEditableVisiblePositionAfterPositionInRoot()| to a better name which | 241 // |firstEditableVisiblePositionAfterPositionInRoot()| to a better name which |
242 // describes what this function returns, since it returns a position before | 242 // describes what this function returns, since it returns a position before |
243 // specified position due by canonicalization. | 243 // specified position due by canonicalization. |
244 CORE_EXPORT VisiblePosition firstEditableVisiblePositionAfterPositionInRoot(cons
t Position&, ContainerNode*); | 244 CORE_EXPORT VisiblePosition firstEditableVisiblePositionAfterPositionInRoot(cons
t Position&, ContainerNode*); |
245 CORE_EXPORT VisiblePositionInComposedTree firstEditableVisiblePositionAfterPosit
ionInRoot(const PositionInComposedTree&, ContainerNode*); | 245 CORE_EXPORT VisiblePositionInComposedTree firstEditableVisiblePositionAfterPosit
ionInRoot(const PositionInComposedTree&, ContainerNode*); |
246 VisiblePosition lastEditableVisiblePositionBeforePositionInRoot(const Position&,
ContainerNode*); | 246 // TODO(yosin) We should rename |
| 247 // |lastEditableVisiblePositionBeforePositionInRoot()| to a better name which |
| 248 // describes what this function returns, since it returns a position after |
| 249 // specified position due by canonicalization. |
| 250 CORE_EXPORT VisiblePosition lastEditableVisiblePositionBeforePositionInRoot(cons
t Position&, ContainerNode*); |
| 251 CORE_EXPORT VisiblePositionInComposedTree lastEditableVisiblePositionBeforePosit
ionInRoot(const PositionInComposedTree&, ContainerNode*); |
247 VisiblePosition visiblePositionBeforeNode(Node&); | 252 VisiblePosition visiblePositionBeforeNode(Node&); |
248 VisiblePosition visiblePositionAfterNode(Node&); | 253 VisiblePosition visiblePositionAfterNode(Node&); |
249 | 254 |
250 bool lineBreakExistsAtVisiblePosition(const VisiblePosition&); | 255 bool lineBreakExistsAtVisiblePosition(const VisiblePosition&); |
251 | 256 |
252 int comparePositions(const VisiblePosition&, const VisiblePosition&); | 257 int comparePositions(const VisiblePosition&, const VisiblePosition&); |
253 | 258 |
254 int indexForVisiblePosition(const VisiblePosition&, RefPtrWillBeRawPtr<Container
Node>& scope); | 259 int indexForVisiblePosition(const VisiblePosition&, RefPtrWillBeRawPtr<Container
Node>& scope); |
255 EphemeralRange makeRange(const VisiblePosition&, const VisiblePosition&); | 260 EphemeralRange makeRange(const VisiblePosition&, const VisiblePosition&); |
256 EphemeralRange normalizeRange(const EphemeralRange&); | 261 EphemeralRange normalizeRange(const EphemeralRange&); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 // FIXME: this is required until 6853027 is fixed and text checking can do t
his for us. | 326 // FIXME: this is required until 6853027 is fixed and text checking can do t
his for us. |
322 return character == '\'' || character == rightSingleQuotationMarkCharacter |
| character == hebrewPunctuationGershayimCharacter; | 327 return character == '\'' || character == rightSingleQuotationMarkCharacter |
| character == hebrewPunctuationGershayimCharacter; |
323 } | 328 } |
324 | 329 |
325 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap
h, bool endIsEndOfParagraph); | 330 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap
h, bool endIsEndOfParagraph); |
326 const String& nonBreakingSpaceString(); | 331 const String& nonBreakingSpaceString(); |
327 | 332 |
328 } | 333 } |
329 | 334 |
330 #endif | 335 #endif |
OLD | NEW |