Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Unified Diff: Source/core/editing/VisiblePosition.cpp

Issue 602423002: Mixing content editable and non-editable in direction RTL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Re-changed back to patch 1 changes Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/editing/selection/skip-non-editable-rtl-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « LayoutTests/editing/selection/skip-non-editable-rtl-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698