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

Unified Diff: ui/gfx/text_constants.h

Issue 1989143002: MacViews: Correct behavior of move and select commands when selection direction changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_commands
Patch Set: Created 4 years, 7 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: ui/gfx/text_constants.h
diff --git a/ui/gfx/text_constants.h b/ui/gfx/text_constants.h
index 93450ea56070d6957379e15733ac24ab14c2d131..65b7adb6e8c6b0b33e4008753a542a0d20928e68 100644
--- a/ui/gfx/text_constants.h
+++ b/ui/gfx/text_constants.h
@@ -15,6 +15,27 @@ enum BreakType {
LINE_BREAK, // Stop cursor movement on line ends as shown on screen.
};
+// Specifies how a move and select command behaves if the selection direction
+// is reversed. For example consider the state "ab|cd|e", i.e. cd is selected.
+// Assume the selection direction is from left to right. If we move to the
+// beginning of the line while modifying the selection, the resultant state is:
+// "|ab|cde" for SELECTION_START_NEW, selection direction from right to left.
+// "|abcd|e" for SELECTION_EXTEND, selection direction from right to left.
+// "ab|cde" for SELECTION_CARET.
+enum SelectionReversedBehavior {
+ // Existing selection is deselcted and a new selection is started in the
+ // opposite direction. Default.
+ SELECTION_START_NEW,
+
+ // The existing selection is extended in the opposite direction.
tapted 2016/05/20 06:47:36 Might be good to give an example of a particular c
karandeepb 2016/05/24 07:47:15 Done.
+ SELECTION_EXTEND,
+
+ // The existing selection reduces to a caret.
+ SELECTION_CARET,
+
+ SELECTION_DEFAULT = SELECTION_START_NEW,
+};
+
// Specifies the word wrapping behavior when a word would exceed the available
// display width. All words that are too wide will be put on a new line, and
// then:

Powered by Google App Engine
This is Rietveld 408576698