Index: Source/core/editing/VisiblePosition.cpp |
diff --git a/Source/core/editing/VisiblePosition.cpp b/Source/core/editing/VisiblePosition.cpp |
index 6f43eafb0198aaad4089e7fbe8c8d828fd1176be..69659ee837eae5cdf307471b8042adeced0131cc 100644 |
--- a/Source/core/editing/VisiblePosition.cpp |
+++ b/Source/core/editing/VisiblePosition.cpp |
@@ -280,8 +280,7 @@ VisiblePosition VisiblePosition::left(bool stayInEditableContent) const |
if (!stayInEditableContent) |
return left; |
- // FIXME: This may need to do something different from "before". |
- return honorEditingBoundaryAtOrBefore(left); |
+ return directionOfEnclosingBlock(left.deepEquivalent()) == LTR ? honorEditingBoundaryAtOrBefore(left) : honorEditingBoundaryAtOrAfter(left); |
} |
Position VisiblePosition::rightVisuallyDistinctCandidate() const |
@@ -448,8 +447,7 @@ VisiblePosition VisiblePosition::right(bool stayInEditableContent) const |
if (!stayInEditableContent) |
return right; |
- // FIXME: This may need to do something different from "after". |
- return honorEditingBoundaryAtOrAfter(right); |
+ return directionOfEnclosingBlock(right.deepEquivalent()) == LTR ? honorEditingBoundaryAtOrAfter(right) : honorEditingBoundaryAtOrBefore(right); |
} |
VisiblePosition VisiblePosition::honorEditingBoundaryAtOrBefore(const VisiblePosition &pos) const |