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

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

Issue 1319753004: Introduce composed tree version of VisiblePosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-07T14:06:02 Rebase for VisibleSelectionChangeObserver and PendingSelection::commit Created 5 years, 3 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/serializers/StyledMarkupSerializer.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/PendingSelection.cpp
diff --git a/Source/core/layout/PendingSelection.cpp b/Source/core/layout/PendingSelection.cpp
index 6686a1033137fc52de3e9da9e78f27a0fd967d01..22e01f08c98cd2aa27b6add7f14cb35792eb467a 100644
--- a/Source/core/layout/PendingSelection.cpp
+++ b/Source/core/layout/PendingSelection.cpp
@@ -86,7 +86,7 @@ VisibleSelection PendingSelection::calcVisibleSelectionAlgorithm() const
SelectionType selectionType = Strategy::selectionType(m_selection);
TextAffinity affinity = m_selection.affinity();
- bool paintBlockCursor = m_shouldShowBlockCursor && selectionType == SelectionType::CaretSelection && !isLogicalEndOfLine(createVisiblePosition(end, affinity));
+ bool paintBlockCursor = m_shouldShowBlockCursor && selectionType == SelectionType::CaretSelection && !isLogicalEndOfLine(createVisiblePositionInDOMTree(end, affinity));
VisibleSelection selection;
if (enclosingTextFormControl(start.computeContainerNode())) {
// TODO(yosin) We should use |PositionMoveType::Character| to avoid
@@ -96,13 +96,13 @@ VisibleSelection PendingSelection::calcVisibleSelectionAlgorithm() const
return selection;
}
- VisiblePosition visibleStart = createVisiblePosition(start, selectionType == SelectionType::RangeSelection ? TextAffinity::Downstream : affinity);
+ VisiblePosition visibleStart = createVisiblePositionInDOMTree(start, selectionType == SelectionType::RangeSelection ? TextAffinity::Downstream : affinity);
if (paintBlockCursor) {
- VisiblePosition visibleExtent = createVisiblePosition(end, affinity);
+ VisiblePosition visibleExtent = createVisiblePositionInDOMTree(end, affinity);
visibleExtent = nextPositionOf(visibleExtent, CanSkipOverEditingBoundary);
return VisibleSelection(visibleStart, visibleExtent);
}
- VisiblePosition visibleEnd = createVisiblePosition(end, selectionType == SelectionType::RangeSelection ? TextAffinity::Upstream : affinity);
+ VisiblePosition visibleEnd = createVisiblePositionInDOMTree(end, selectionType == SelectionType::RangeSelection ? TextAffinity::Upstream : affinity);
return VisibleSelection(visibleStart, visibleEnd);
}
« no previous file with comments | « Source/core/editing/serializers/StyledMarkupSerializer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698