| OLD | NEW |
| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 131 } |
| 132 | 132 |
| 133 // Only need to call appliedEditing for top-level commands, and TypingCommands | 133 // Only need to call appliedEditing for top-level commands, and TypingCommands |
| 134 // do it on their own (see TypingCommand::typingAddedToOpenCommand). | 134 // do it on their own (see TypingCommand::typingAddedToOpenCommand). |
| 135 if (!isTypingCommand()) | 135 if (!isTypingCommand()) |
| 136 frame->editor().appliedEditing(this); | 136 frame->editor().appliedEditing(this); |
| 137 setShouldRetainAutocorrectionIndicator(false); | 137 setShouldRetainAutocorrectionIndicator(false); |
| 138 return !editingState.isAborted(); | 138 return !editingState.isAborted(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 EditCommandComposition* CompositeEditCommand::ensureComposition() { | 141 UndoStep* CompositeEditCommand::ensureComposition() { |
| 142 CompositeEditCommand* command = this; | 142 CompositeEditCommand* command = this; |
| 143 while (command && command->parent()) | 143 while (command && command->parent()) |
| 144 command = command->parent(); | 144 command = command->parent(); |
| 145 if (!command->m_composition) | 145 if (!command->m_composition) { |
| 146 command->m_composition = EditCommandComposition::create( | 146 command->m_composition = UndoStep::create(&document(), startingSelection(), |
| 147 &document(), startingSelection(), endingSelection(), inputType()); | 147 endingSelection(), inputType()); |
| 148 } |
| 148 return command->m_composition.get(); | 149 return command->m_composition.get(); |
| 149 } | 150 } |
| 150 | 151 |
| 151 bool CompositeEditCommand::preservesTypingStyle() const { | 152 bool CompositeEditCommand::preservesTypingStyle() const { |
| 152 return false; | 153 return false; |
| 153 } | 154 } |
| 154 | 155 |
| 155 bool CompositeEditCommand::isTypingCommand() const { | 156 bool CompositeEditCommand::isTypingCommand() const { |
| 156 return false; | 157 return false; |
| 157 } | 158 } |
| (...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1929 return node; | 1930 return node; |
| 1930 } | 1931 } |
| 1931 | 1932 |
| 1932 DEFINE_TRACE(CompositeEditCommand) { | 1933 DEFINE_TRACE(CompositeEditCommand) { |
| 1933 visitor->trace(m_commands); | 1934 visitor->trace(m_commands); |
| 1934 visitor->trace(m_composition); | 1935 visitor->trace(m_composition); |
| 1935 EditCommand::trace(visitor); | 1936 EditCommand::trace(visitor); |
| 1936 } | 1937 } |
| 1937 | 1938 |
| 1938 } // namespace blink | 1939 } // namespace blink |
| OLD | NEW |