| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Changes to the document may have been made since the last editing operation | 120 // Changes to the document may have been made since the last editing operation |
| 121 // that require a layout, as in <rdar://problem/5658603>. Low level | 121 // that require a layout, as in <rdar://problem/5658603>. Low level |
| 122 // operations, like RemoveNodeCommand, don't require a layout because the high | 122 // operations, like RemoveNodeCommand, don't require a layout because the high |
| 123 // level operations that use them perform one if one is necessary (like for | 123 // level operations that use them perform one if one is necessary (like for |
| 124 // the creation of VisiblePositions). | 124 // the creation of VisiblePositions). |
| 125 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 125 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 126 | 126 |
| 127 LocalFrame* frame = document().frame(); | 127 LocalFrame* frame = document().frame(); |
| 128 DCHECK(frame); | 128 DCHECK(frame); |
| 129 EditingState editingState; | 129 EditingState editingState; |
| 130 { | 130 EventQueueScope eventQueueScope; |
| 131 EventQueueScope eventQueueScope; | 131 doApply(&editingState); |
| 132 doApply(&editingState); | |
| 133 } | |
| 134 | 132 |
| 135 // Only need to call appliedEditing for top-level commands, and TypingCommands | 133 // Only need to call appliedEditing for top-level commands, and TypingCommands |
| 136 // do it on their own (see TypingCommand::typingAddedToOpenCommand). | 134 // do it on their own (see TypingCommand::typingAddedToOpenCommand). |
| 137 if (!isTypingCommand()) | 135 if (!isTypingCommand()) |
| 138 frame->editor().appliedEditing(this); | 136 frame->editor().appliedEditing(this); |
| 139 setShouldRetainAutocorrectionIndicator(false); | 137 setShouldRetainAutocorrectionIndicator(false); |
| 140 return !editingState.isAborted(); | 138 return !editingState.isAborted(); |
| 141 } | 139 } |
| 142 | 140 |
| 143 UndoStep* CompositeEditCommand::ensureUndoStep() { | 141 UndoStep* CompositeEditCommand::ensureUndoStep() { |
| (...skipping 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1970 | 1968 |
| 1971 DEFINE_TRACE(CompositeEditCommand) { | 1969 DEFINE_TRACE(CompositeEditCommand) { |
| 1972 visitor->trace(m_commands); | 1970 visitor->trace(m_commands); |
| 1973 visitor->trace(m_startingSelection); | 1971 visitor->trace(m_startingSelection); |
| 1974 visitor->trace(m_endingSelection); | 1972 visitor->trace(m_endingSelection); |
| 1975 visitor->trace(m_undoStep); | 1973 visitor->trace(m_undoStep); |
| 1976 EditCommand::trace(visitor); | 1974 EditCommand::trace(visitor); |
| 1977 } | 1975 } |
| 1978 | 1976 |
| 1979 } // namespace blink | 1977 } // namespace blink |
| OLD | NEW |