Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
| index 0e62147626a93b29da7a6448491b0d3100df5b48..a7f9894078992c22b6d42386e255d88f21e0c9b4 100644 |
| --- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
| +++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
| @@ -2268,7 +2268,7 @@ static bool inRenderedText(const PositionTemplate<Strategy>& position) |
| } |
| if (box->containsCaretOffset(textOffset)) { |
| // Return false for offsets inside composed characters. |
| - return textOffset == 0 || textOffset == textLayoutObject->nextOffset(textLayoutObject->previousOffset(textOffset)); |
| + return textOffset == 0 || textOffset == uncheckedNextOffset(anchorNode, uncheckedPreviousOffset(anchorNode, textOffset)); |
| } |
| } |
| @@ -2851,7 +2851,7 @@ static PositionTemplate<Strategy> leftVisuallyDistinctCandidate(const VisiblePos |
| continue; |
| } |
| - offset = box->isLeftToRightDirection() ? lineLayoutItem.previousOffset(offset) : lineLayoutItem.nextOffset(offset); |
| + offset = box->isLeftToRightDirection() ? uncheckedPreviousOffset(lineLayoutItem.node(), offset) : uncheckedNextOffset(lineLayoutItem.node(), offset); |
|
tkent
2016/03/25 04:34:08
nit: no need to add an extra space before |box|.
Seigo Nonaka
2016/03/25 05:11:22
Done.
|
| int caretMinOffset = box->caretMinOffset(); |
| int caretMaxOffset = box->caretMaxOffset(); |
| @@ -3026,7 +3026,7 @@ static PositionTemplate<Strategy> rightVisuallyDistinctCandidate(const VisiblePo |
| continue; |
| } |
| - offset = box->isLeftToRightDirection() ? layoutObject->nextOffset(offset) : layoutObject->previousOffset(offset); |
| + offset = box->isLeftToRightDirection() ? uncheckedNextOffset(layoutObject->node(), offset) : uncheckedPreviousOffset(layoutObject->node(), offset); |
|
tkent
2016/03/25 04:34:08
nit: no need to add an extra space before |uncheck
Seigo Nonaka
2016/03/25 05:11:22
Done.
|
| int caretMinOffset = box->caretMinOffset(); |
| int caretMaxOffset = box->caretMaxOffset(); |