OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007 Apple, Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 if (!m_parent) | 87 if (!m_parent) |
88 updateLayout(); | 88 updateLayout(); |
89 | 89 |
90 DeleteButtonController* deleteButtonController = frame->editor()->deleteButt
onController(); | 90 DeleteButtonController* deleteButtonController = frame->editor()->deleteButt
onController(); |
91 deleteButtonController->disable(); | 91 deleteButtonController->disable(); |
92 doApply(); | 92 doApply(); |
93 deleteButtonController->enable(); | 93 deleteButtonController->enable(); |
94 | 94 |
95 if (!m_parent) { | 95 if (!m_parent) { |
96 updateLayout(); | 96 updateLayout(); |
97 frame->editor()->appliedEditing(this); | 97 // Only need to call appliedEditing for top-level commands, and TypingCo
mmands do it on their |
| 98 // own (see TypingCommand::typingAddedToOpenCommand). |
| 99 if (!isTypingCommand()) |
| 100 frame->editor()->appliedEditing(this); |
98 } | 101 } |
99 } | 102 } |
100 | 103 |
101 void EditCommand::unapply() | 104 void EditCommand::unapply() |
102 { | 105 { |
103 ASSERT(m_document); | 106 ASSERT(m_document); |
104 ASSERT(m_document->frame()); | 107 ASSERT(m_document->frame()); |
105 | 108 |
106 Frame* frame = m_document->frame(); | 109 Frame* frame = m_document->frame(); |
107 | 110 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 m_endingRootEditableElement = parent->m_endingRootEditableElement; | 225 m_endingRootEditableElement = parent->m_endingRootEditableElement; |
223 } | 226 } |
224 | 227 |
225 void applyCommand(PassRefPtr<EditCommand> command) | 228 void applyCommand(PassRefPtr<EditCommand> command) |
226 { | 229 { |
227 command->apply(); | 230 command->apply(); |
228 } | 231 } |
229 | 232 |
230 } // namespace WebCore | 233 } // namespace WebCore |
231 | 234 |
OLD | NEW |