| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 2433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 inlineBox->prevLeafChildIgnoringLineBreak()) { | 2444 inlineBox->prevLeafChildIgnoringLineBreak()) { |
| 2445 if (tertiaryBox->bidiLevel() <= level) | 2445 if (tertiaryBox->bidiLevel() <= level) |
| 2446 break; | 2446 break; |
| 2447 inlineBox = tertiaryBox; | 2447 inlineBox = tertiaryBox; |
| 2448 } | 2448 } |
| 2449 return InlineBoxPosition(inlineBox, inlineBox->caretLeftmostOffset()); | 2449 return InlineBoxPosition(inlineBox, inlineBox->caretLeftmostOffset()); |
| 2450 } | 2450 } |
| 2451 return InlineBoxPosition(inlineBox, caretOffset); | 2451 return InlineBoxPosition(inlineBox, caretOffset); |
| 2452 } | 2452 } |
| 2453 | 2453 |
| 2454 if (layoutObject && layoutObject->style()->unicodeBidi() == Plaintext) { | 2454 if (layoutObject && |
| 2455 layoutObject->style()->unicodeBidi() == EUnicodeBidi::kPlaintext) { |
| 2455 if (inlineBox->bidiLevel() < level) | 2456 if (inlineBox->bidiLevel() < level) |
| 2456 return InlineBoxPosition(inlineBox, inlineBox->caretLeftmostOffset()); | 2457 return InlineBoxPosition(inlineBox, inlineBox->caretLeftmostOffset()); |
| 2457 return InlineBoxPosition(inlineBox, inlineBox->caretRightmostOffset()); | 2458 return InlineBoxPosition(inlineBox, inlineBox->caretRightmostOffset()); |
| 2458 } | 2459 } |
| 2459 | 2460 |
| 2460 InlineBox* nextBox = inlineBox->nextLeafChildIgnoringLineBreak(); | 2461 InlineBox* nextBox = inlineBox->nextLeafChildIgnoringLineBreak(); |
| 2461 if (!nextBox || nextBox->bidiLevel() < level) { | 2462 if (!nextBox || nextBox->bidiLevel() < level) { |
| 2462 // Right edge of a secondary run. Set to the left edge of the entire | 2463 // Right edge of a secondary run. Set to the left edge of the entire |
| 2463 // run. | 2464 // run. |
| 2464 while (InlineBox* prevBox = inlineBox->prevLeafChildIgnoringLineBreak()) { | 2465 while (InlineBox* prevBox = inlineBox->prevLeafChildIgnoringLineBreak()) { |
| (...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3851 | 3852 |
| 3852 VisiblePositionInFlatTree previousPositionOf( | 3853 VisiblePositionInFlatTree previousPositionOf( |
| 3853 const VisiblePositionInFlatTree& visiblePosition, | 3854 const VisiblePositionInFlatTree& visiblePosition, |
| 3854 EditingBoundaryCrossingRule rule) { | 3855 EditingBoundaryCrossingRule rule) { |
| 3855 DCHECK(visiblePosition.isValid()) << visiblePosition; | 3856 DCHECK(visiblePosition.isValid()) << visiblePosition; |
| 3856 return previousPositionOfAlgorithm<EditingInFlatTreeStrategy>( | 3857 return previousPositionOfAlgorithm<EditingInFlatTreeStrategy>( |
| 3857 visiblePosition.deepEquivalent(), rule); | 3858 visiblePosition.deepEquivalent(), rule); |
| 3858 } | 3859 } |
| 3859 | 3860 |
| 3860 } // namespace blink | 3861 } // namespace blink |
| OLD | NEW |