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

Unified Diff: Source/core/layout/LayoutView.cpp

Issue 1300303002: Introduce isVisuallyEquivalentCandidate() as replacement of PositionAlgorithm::isCandidate() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-21T01:27:16 Rebase Created 5 years, 4 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 | « Source/core/editing/commands/InsertTextCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutView.cpp
diff --git a/Source/core/layout/LayoutView.cpp b/Source/core/layout/LayoutView.cpp
index ead1a72bd8ad37997767b150530e9dbe55d0e8d1..6a6419d91d6bbfc57de34fdf7748911a7464bc4a 100644
--- a/Source/core/layout/LayoutView.cpp
+++ b/Source/core/layout/LayoutView.cpp
@@ -804,11 +804,11 @@ void LayoutView::commitPendingSelectionAlgorithm()
// and will fill the gap before 'bar'.
PositionType startPos = Strategy::selectionStart(selection);
PositionType candidate = startPos.downstream();
- if (candidate.isCandidate())
+ if (isVisuallyEquivalentCandidate(candidate))
startPos = candidate;
PositionType endPos = Strategy::selectionEnd(selection);
candidate = endPos.upstream();
- if (candidate.isCandidate())
+ if (isVisuallyEquivalentCandidate(candidate))
endPos = candidate;
// We can get into a state where the selection endpoints map to the same VisiblePosition when a selection is deleted
« no previous file with comments | « Source/core/editing/commands/InsertTextCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698