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

Side by Side Diff: Source/core/editing/EditingBehavior.h

Issue 43143003: Undo of delete/forward-delete of text should not select the deleted text on non-mac platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // On Mac, selecting backwards by word/line from the middle of a word/line, and then going 72 // On Mac, selecting backwards by word/line from the middle of a word/line, and then going
73 // forward leaves the caret back in the middle with no selection, instead of directly selecting 73 // forward leaves the caret back in the middle with no selection, instead of directly selecting
74 // to the other end of the line/word (Unix/Windows behavior). 74 // to the other end of the line/word (Unix/Windows behavior).
75 bool shouldExtendSelectionByWordOrLineAcrossCaret() const { return m_type != EditingMacBehavior; } 75 bool shouldExtendSelectionByWordOrLineAcrossCaret() const { return m_type != EditingMacBehavior; }
76 76
77 // Based on native behavior, when using ctrl(alt)+arrow to move caret by wor d, ctrl(alt)+left arrow moves caret to 77 // Based on native behavior, when using ctrl(alt)+arrow to move caret by wor d, ctrl(alt)+left arrow moves caret to
78 // immediately before the word in all platforms, for example, the word break positions are: "|abc |def |hij |opq". 78 // immediately before the word in all platforms, for example, the word break positions are: "|abc |def |hij |opq".
79 // But ctrl+right arrow moves caret to "abc |def |hij |opq" on Windows and " abc| def| hij| opq|" on Mac and Linux. 79 // But ctrl+right arrow moves caret to "abc |def |hij |opq" on Windows and " abc| def| hij| opq|" on Mac and Linux.
80 bool shouldSkipSpaceWhenMovingRight() const { return m_type == EditingWindow sBehavior; } 80 bool shouldSkipSpaceWhenMovingRight() const { return m_type == EditingWindow sBehavior; }
81 81
82 // On Mac, undo of delete/forward-delete of a word should select the deleted word. On other platforms deleted word
83 // should not be selected and the cursor should be placed where the deletion started.
84 bool shouldUndoOfWordDeletionSelectWord() const { return m_type == EditingMa cBehavior; }
ojan 2013/10/26 01:36:01 This name isn't quite right. It's not just word se
85
82 private: 86 private:
83 EditingBehaviorType m_type; 87 EditingBehaviorType m_type;
84 }; 88 };
85 89
86 } // namespace WebCore 90 } // namespace WebCore
87 91
88 #endif // EditingBehavior_h 92 #endif // EditingBehavior_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698