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

Unified Diff: Source/core/editing/commands/EditorCommand.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
Index: Source/core/editing/commands/EditorCommand.cpp
diff --git a/Source/core/editing/commands/EditorCommand.cpp b/Source/core/editing/commands/EditorCommand.cpp
index 72808fd31595b85de24e661ade71cbff5f1e4c56..546c0dabfb9d5008efae0e4428648de28f9ba2ae 100644
--- a/Source/core/editing/commands/EditorCommand.cpp
+++ b/Source/core/editing/commands/EditorCommand.cpp
@@ -220,7 +220,7 @@ static bool expandSelectionToGranularity(LocalFrame& frame, TextGranularity gran
return false;
if (newRange.isCollapsed())
return false;
- EAffinity affinity = frame.selection().affinity();
+ TextAffinity affinity = frame.selection().affinity();
frame.selection().setSelectedRange(newRange, affinity, FrameSelection::NonDirectional, FrameSelection::CloseTyping);
return true;
}
@@ -398,7 +398,7 @@ static bool executeDeleteToMark(LocalFrame& frame, Event*, EditorCommandSource,
// |VisibleSelection::toNormalizedRange()|.
RefPtrWillBeRawPtr<Range> mark = frame.editor().mark().toNormalizedRange();
if (mark) {
- bool selected = frame.selection().setSelectedRange(unionEphemeralRanges(EphemeralRange(mark.get()), frame.editor().selectedRange()), DOWNSTREAM, FrameSelection::NonDirectional, FrameSelection::CloseTyping);
+ bool selected = frame.selection().setSelectedRange(unionEphemeralRanges(EphemeralRange(mark.get()), frame.editor().selectedRange()), TextAffinity::Downstream, FrameSelection::NonDirectional, FrameSelection::CloseTyping);
ASSERT(selected);
if (!selected)
return false;
@@ -1048,7 +1048,7 @@ static bool executeSelectToMark(LocalFrame& frame, Event*, EditorCommandSource,
EphemeralRange selection = frame.editor().selectedRange();
if (!mark || selection.isNull())
return false;
- frame.selection().setSelectedRange(unionEphemeralRanges(EphemeralRange(mark.get()), selection), DOWNSTREAM, FrameSelection::NonDirectional, FrameSelection::CloseTyping);
+ frame.selection().setSelectedRange(unionEphemeralRanges(EphemeralRange(mark.get()), selection), TextAffinity::Downstream, FrameSelection::NonDirectional, FrameSelection::CloseTyping);
return true;
}
« no previous file with comments | « Source/core/editing/commands/DeleteSelectionCommand.cpp ('k') | Source/core/editing/commands/IndentOutdentCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698