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

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

Issue 1299873002: ALL-IN-ONE Introduce enum class TextAffinity (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T18:08:52 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/layout/PendingSelection.h ('k') | Source/core/layout/svg/LayoutSVGInlineText.cpp » ('j') | 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 2eb268bb2a12000f2512c594df59490f514e0012..7faf797afed4c752feb187ac758cc39fc503a129 100644
--- a/Source/core/layout/PendingSelection.cpp
+++ b/Source/core/layout/PendingSelection.cpp
@@ -82,7 +82,7 @@ VisibleSelection PendingSelection::calcVisibleSelectionAlgorithm() const
PositionType start = Strategy::selectionStart(m_selection);
PositionType end = Strategy::selectionEnd(m_selection);
SelectionType selectionType = VisibleSelection::selectionType(start, end);
- EAffinity affinity = m_selection.affinity();
+ TextAffinity affinity = m_selection.affinity();
bool paintBlockCursor = m_shouldShowBlockCursor && selectionType == SelectionType::CaretSelection && !isLogicalEndOfLine(VisiblePosition(end, affinity));
VisibleSelection selection;
@@ -92,13 +92,13 @@ VisibleSelection PendingSelection::calcVisibleSelectionAlgorithm() const
return selection;
}
- VisiblePosition visibleStart = VisiblePosition(start, selectionType == SelectionType::RangeSelection ? DOWNSTREAM : affinity);
+ VisiblePosition visibleStart = VisiblePosition(start, selectionType == SelectionType::RangeSelection ? TextAffinity::Downstream : affinity);
if (paintBlockCursor) {
VisiblePosition visibleExtent(end, affinity);
visibleExtent = visibleExtent.next(CanSkipOverEditingBoundary);
return VisibleSelection(visibleStart, visibleExtent);
}
- VisiblePosition visibleEnd(end, selectionType == SelectionType::RangeSelection ? UPSTREAM : affinity);
+ VisiblePosition visibleEnd(end, selectionType == SelectionType::RangeSelection ? TextAffinity::Upstream : affinity);
return VisibleSelection(visibleStart, visibleEnd);
}
« no previous file with comments | « Source/core/layout/PendingSelection.h ('k') | Source/core/layout/svg/LayoutSVGInlineText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698