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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Issue 2457523003: Support 'insertReplacementText' for spellcheck (Closed)
Patch Set: yosin@ comment#57 #58 addressed Created 4 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) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 bool CompositeEditCommand::apply() { 190 bool CompositeEditCommand::apply() {
191 DCHECK(!isCommandGroupWrapper()); 191 DCHECK(!isCommandGroupWrapper());
192 if (!endingSelection().isContentRichlyEditable()) { 192 if (!endingSelection().isContentRichlyEditable()) {
193 switch (inputType()) { 193 switch (inputType()) {
194 case InputEvent::InputType::InsertText: 194 case InputEvent::InputType::InsertText:
195 case InputEvent::InputType::InsertLineBreak: 195 case InputEvent::InputType::InsertLineBreak:
196 case InputEvent::InputType::InsertParagraph: 196 case InputEvent::InputType::InsertParagraph:
197 case InputEvent::InputType::InsertFromPaste: 197 case InputEvent::InputType::InsertFromPaste:
198 case InputEvent::InputType::InsertFromDrop: 198 case InputEvent::InputType::InsertFromDrop:
199 case InputEvent::InputType::InsertReplacementText:
199 case InputEvent::InputType::DeleteComposedCharacterForward: 200 case InputEvent::InputType::DeleteComposedCharacterForward:
200 case InputEvent::InputType::DeleteComposedCharacterBackward: 201 case InputEvent::InputType::DeleteComposedCharacterBackward:
201 case InputEvent::InputType::DeleteWordBackward: 202 case InputEvent::InputType::DeleteWordBackward:
202 case InputEvent::InputType::DeleteWordForward: 203 case InputEvent::InputType::DeleteWordForward:
203 case InputEvent::InputType::DeleteLineBackward: 204 case InputEvent::InputType::DeleteLineBackward:
204 case InputEvent::InputType::DeleteLineForward: 205 case InputEvent::InputType::DeleteLineForward:
205 case InputEvent::InputType::DeleteContentBackward: 206 case InputEvent::InputType::DeleteContentBackward:
206 case InputEvent::InputType::DeleteContentForward: 207 case InputEvent::InputType::DeleteContentForward:
207 case InputEvent::InputType::DeleteByCut: 208 case InputEvent::InputType::DeleteByCut:
208 case InputEvent::InputType::DeleteByDrag: 209 case InputEvent::InputType::DeleteByDrag:
(...skipping 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 return node; 2021 return node;
2021 } 2022 }
2022 2023
2023 DEFINE_TRACE(CompositeEditCommand) { 2024 DEFINE_TRACE(CompositeEditCommand) {
2024 visitor->trace(m_commands); 2025 visitor->trace(m_commands);
2025 visitor->trace(m_composition); 2026 visitor->trace(m_composition);
2026 EditCommand::trace(visitor); 2027 EditCommand::trace(visitor);
2027 } 2028 }
2028 2029
2029 } // namespace blink 2030 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698