OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 | 368 |
369 TextDirection blockDirection = directionOfEnclosingBlock(visiblePosition.dee
pEquivalent()); | 369 TextDirection blockDirection = directionOfEnclosingBlock(visiblePosition.dee
pEquivalent()); |
370 InlineBox* previouslyVisitedBox = 0; | 370 InlineBox* previouslyVisitedBox = 0; |
371 VisiblePosition current = visiblePosition; | 371 VisiblePosition current = visiblePosition; |
372 TextBreakIterator* iter = 0; | 372 TextBreakIterator* iter = 0; |
373 | 373 |
374 CachedLogicallyOrderedLeafBoxes leafBoxes; | 374 CachedLogicallyOrderedLeafBoxes leafBoxes; |
375 Vector<UChar, 1024> string; | 375 Vector<UChar, 1024> string; |
376 | 376 |
377 while (1) { | 377 while (1) { |
378 VisiblePosition adjacentCharacterPosition = direction == MoveRight ? cur
rent.right() : current.left(); | 378 VisiblePosition adjacentCharacterPosition = direction == MoveRight ? rig
htPositionOf(current) : leftPositionOf(current); |
379 if (adjacentCharacterPosition.deepEquivalent() == current.deepEquivalent
() || adjacentCharacterPosition.isNull()) | 379 if (adjacentCharacterPosition.deepEquivalent() == current.deepEquivalent
() || adjacentCharacterPosition.isNull()) |
380 return VisiblePosition(); | 380 return VisiblePosition(); |
381 | 381 |
382 InlineBoxPosition boxPosition = computeInlineBoxPosition(adjacentCharact
erPosition.deepEquivalent(), TextAffinity::Upstream); | 382 InlineBoxPosition boxPosition = computeInlineBoxPosition(adjacentCharact
erPosition.deepEquivalent(), TextAffinity::Upstream); |
383 InlineBox* box = boxPosition.inlineBox; | 383 InlineBox* box = boxPosition.inlineBox; |
384 int offsetInBox = boxPosition.offsetInBox; | 384 int offsetInBox = boxPosition.offsetInBox; |
385 | 385 |
386 if (!box) | 386 if (!box) |
387 break; | 387 break; |
388 if (!box->isInlineTextBox()) { | 388 if (!box->isInlineTextBox()) { |
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2331 { | 2331 { |
2332 return isVisuallyEquivalentCandidateAlgorithm<EditingStrategy>(position); | 2332 return isVisuallyEquivalentCandidateAlgorithm<EditingStrategy>(position); |
2333 } | 2333 } |
2334 | 2334 |
2335 bool isVisuallyEquivalentCandidate(const PositionInComposedTree& position) | 2335 bool isVisuallyEquivalentCandidate(const PositionInComposedTree& position) |
2336 { | 2336 { |
2337 return isVisuallyEquivalentCandidateAlgorithm<EditingInComposedTreeStrategy>
(position); | 2337 return isVisuallyEquivalentCandidateAlgorithm<EditingInComposedTreeStrategy>
(position); |
2338 } | 2338 } |
2339 | 2339 |
2340 } // namespace blink | 2340 } // namespace blink |
OLD | NEW |