| 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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 | 712 |
| 713 void Editor::unappliedEditing(PassRefPtrWillBeRawPtr<EditCommandComposition> cmd
) | 713 void Editor::unappliedEditing(PassRefPtrWillBeRawPtr<EditCommandComposition> cmd
) |
| 714 { | 714 { |
| 715 EventQueueScope scope; | 715 EventQueueScope scope; |
| 716 m_frame.document()->updateLayout(); | 716 m_frame.document()->updateLayout(); |
| 717 | 717 |
| 718 dispatchEditableContentChangedEvents(cmd->startingRootEditableElement(), cmd
->endingRootEditableElement()); | 718 dispatchEditableContentChangedEvents(cmd->startingRootEditableElement(), cmd
->endingRootEditableElement()); |
| 719 | 719 |
| 720 VisibleSelection newSelection(cmd->startingSelection()); | 720 VisibleSelection newSelection(cmd->startingSelection()); |
| 721 newSelection.validatePositionsIfNeeded(); | 721 newSelection.validatePositionsIfNeeded(); |
| 722 changeSelectionAfterCommand(newSelection, FrameSelection::CloseTyping | Fram
eSelection::ClearTypingStyle); | 722 if (newSelection.start().document() == m_frame.document() && newSelection.en
d().document() == m_frame.document()) |
| 723 changeSelectionAfterCommand(newSelection, FrameSelection::CloseTyping |
FrameSelection::ClearTypingStyle); |
| 723 | 724 |
| 724 m_lastEditCommand = nullptr; | 725 m_lastEditCommand = nullptr; |
| 725 if (UndoStack* undoStack = this->undoStack()) | 726 if (UndoStack* undoStack = this->undoStack()) |
| 726 undoStack->registerRedoStep(cmd); | 727 undoStack->registerRedoStep(cmd); |
| 727 respondToChangedContents(newSelection); | 728 respondToChangedContents(newSelection); |
| 728 } | 729 } |
| 729 | 730 |
| 730 void Editor::reappliedEditing(PassRefPtrWillBeRawPtr<EditCommandComposition> cmd
) | 731 void Editor::reappliedEditing(PassRefPtrWillBeRawPtr<EditCommandComposition> cmd
) |
| 731 { | 732 { |
| 732 EventQueueScope scope; | 733 EventQueueScope scope; |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1236 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); | 1237 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); |
| 1237 } | 1238 } |
| 1238 | 1239 |
| 1239 void Editor::trace(Visitor* visitor) | 1240 void Editor::trace(Visitor* visitor) |
| 1240 { | 1241 { |
| 1241 visitor->trace(m_lastEditCommand); | 1242 visitor->trace(m_lastEditCommand); |
| 1242 visitor->trace(m_mark); | 1243 visitor->trace(m_mark); |
| 1243 } | 1244 } |
| 1244 | 1245 |
| 1245 } // namespace WebCore | 1246 } // namespace WebCore |
| OLD | NEW |