OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2009 Igalia S.L. | 4 * Copyright (C) 2009 Igalia S.L. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return InputType::InsertUnorderedList; | 145 return InputType::InsertUnorderedList; |
146 | 146 |
147 // Deletion. | 147 // Deletion. |
148 case CommandType::Delete: | 148 case CommandType::Delete: |
149 case CommandType::DeleteBackward: | 149 case CommandType::DeleteBackward: |
150 case CommandType::DeleteBackwardByDecomposingPreviousCharacter: | 150 case CommandType::DeleteBackwardByDecomposingPreviousCharacter: |
151 return InputType::DeleteContentBackward; | 151 return InputType::DeleteContentBackward; |
152 case CommandType::DeleteForward: | 152 case CommandType::DeleteForward: |
153 return InputType::DeleteContentForward; | 153 return InputType::DeleteContentForward; |
154 case CommandType::DeleteToBeginningOfLine: | 154 case CommandType::DeleteToBeginningOfLine: |
155 return InputType::DeleteLineBackward; | 155 return InputType::DeleteSoftLineBackward; |
156 case CommandType::DeleteToEndOfLine: | 156 case CommandType::DeleteToEndOfLine: |
157 return InputType::DeleteLineForward; | 157 return InputType::DeleteSoftLineForward; |
158 case CommandType::DeleteWordBackward: | 158 case CommandType::DeleteWordBackward: |
159 return InputType::DeleteWordBackward; | 159 return InputType::DeleteWordBackward; |
160 case CommandType::DeleteWordForward: | 160 case CommandType::DeleteWordForward: |
161 return InputType::DeleteWordForward; | 161 return InputType::DeleteWordForward; |
| 162 case CommandType::DeleteToBeginningOfParagraph: |
| 163 return InputType::DeleteHardLineBackward; |
| 164 case CommandType::DeleteToEndOfParagraph: |
| 165 return InputType::DeleteHardLineForward; |
162 // TODO(chongz): Find appreciate InputType for following commands. | 166 // TODO(chongz): Find appreciate InputType for following commands. |
163 case CommandType::DeleteToBeginningOfParagraph: | |
164 case CommandType::DeleteToEndOfParagraph: | |
165 case CommandType::DeleteToMark: | 167 case CommandType::DeleteToMark: |
166 return InputType::None; | 168 return InputType::None; |
167 | 169 |
168 // Command. | 170 // Command. |
169 case CommandType::Undo: | 171 case CommandType::Undo: |
170 return InputType::HistoryUndo; | 172 return InputType::HistoryUndo; |
171 case CommandType::Redo: | 173 case CommandType::Redo: |
172 return InputType::HistoryRedo; | 174 return InputType::HistoryRedo; |
173 // Cut and Paste will be handled in |Editor::dispatchCPPEvent()|. | 175 // Cut and Paste will be handled in |Editor::dispatchCPPEvent()|. |
174 | 176 |
(...skipping 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2948 *m_frame, DirectionBackward, WordGranularity); | 2950 *m_frame, DirectionBackward, WordGranularity); |
2949 case WebEditingCommandType::DeleteWordForward: | 2951 case WebEditingCommandType::DeleteWordForward: |
2950 return RangesFromCurrentSelectionOrExtendCaret(*m_frame, DirectionForward, | 2952 return RangesFromCurrentSelectionOrExtendCaret(*m_frame, DirectionForward, |
2951 WordGranularity); | 2953 WordGranularity); |
2952 default: | 2954 default: |
2953 return targetRangesForInputEvent(*target); | 2955 return targetRangesForInputEvent(*target); |
2954 } | 2956 } |
2955 } | 2957 } |
2956 | 2958 |
2957 } // namespace blink | 2959 } // namespace blink |
OLD | NEW |