| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 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 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 case TypingCommand::InsertText: | 131 case TypingCommand::InsertText: |
| 132 case TypingCommand::InsertLineBreak: | 132 case TypingCommand::InsertLineBreak: |
| 133 case TypingCommand::InsertParagraphSeparator: | 133 case TypingCommand::InsertParagraphSeparator: |
| 134 case TypingCommand::InsertParagraphSeparatorInQuotedContent: | 134 case TypingCommand::InsertParagraphSeparatorInQuotedContent: |
| 135 return InputEvent::InputType::InsertText; | 135 return InputEvent::InputType::InsertText; |
| 136 default: | 136 default: |
| 137 return InputEvent::InputType::None; | 137 return InputEvent::InputType::None; |
| 138 } | 138 } |
| 139 } | 139 } |
| 140 | 140 |
| 141 // TODO(chongz): Handle other edit actions. | 141 switch (command->editingAction()) { |
| 142 return InputEvent::InputType::None; | 142 // TODO(chongz): Handle remaining edit actions. |
| 143 case EditActionBold: |
| 144 return InputEvent::InputType::Bold; |
| 145 case EditActionItalics: |
| 146 return InputEvent::InputType::Italic; |
| 147 case EditActionUnderline: |
| 148 return InputEvent::InputType::Underline; |
| 149 case EditActionStrikeThrough: |
| 150 return InputEvent::InputType::StrikeThrough; |
| 151 case EditActionSuperscript: |
| 152 return InputEvent::InputType::Superscript; |
| 153 case EditActionSubscript: |
| 154 return InputEvent::InputType::Subscript; |
| 155 default: |
| 156 return InputEvent::InputType::None; |
| 157 } |
| 143 } | 158 } |
| 144 | 159 |
| 145 InputEvent::EventIsComposing isComposingFromCommand(const CompositeEditCommand*
command) | 160 InputEvent::EventIsComposing isComposingFromCommand(const CompositeEditCommand*
command) |
| 146 { | 161 { |
| 147 if (command->isTypingCommand() && toTypingCommand(command)->compositionType(
) != TypingCommand::TextCompositionNone) | 162 if (command->isTypingCommand() && toTypingCommand(command)->compositionType(
) != TypingCommand::TextCompositionNone) |
| 148 return InputEvent::EventIsComposing::IsComposing; | 163 return InputEvent::EventIsComposing::IsComposing; |
| 149 return InputEvent::EventIsComposing::NotComposing; | 164 return InputEvent::EventIsComposing::NotComposing; |
| 150 } | 165 } |
| 151 | 166 |
| 152 } // anonymous namespace | 167 } // anonymous namespace |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1423 | 1438 |
| 1424 DEFINE_TRACE(Editor) | 1439 DEFINE_TRACE(Editor) |
| 1425 { | 1440 { |
| 1426 visitor->trace(m_frame); | 1441 visitor->trace(m_frame); |
| 1427 visitor->trace(m_lastEditCommand); | 1442 visitor->trace(m_lastEditCommand); |
| 1428 visitor->trace(m_undoStack); | 1443 visitor->trace(m_undoStack); |
| 1429 visitor->trace(m_mark); | 1444 visitor->trace(m_mark); |
| 1430 } | 1445 } |
| 1431 | 1446 |
| 1432 } // namespace blink | 1447 } // namespace blink |
| OLD | NEW |