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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 } | 711 } |
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 changeSelectionAfterCommand(newSelection, FrameSelection::CloseTyping | Fram
eSelection::ClearTypingStyle); | 722 changeSelectionAfterCommand(newSelection, FrameSelection::CloseTyping | Fram
eSelection::ClearTypingStyle); |
722 | 723 |
723 m_lastEditCommand = nullptr; | 724 m_lastEditCommand = nullptr; |
724 if (UndoStack* undoStack = this->undoStack()) | 725 if (UndoStack* undoStack = this->undoStack()) |
725 undoStack->registerRedoStep(cmd); | 726 undoStack->registerRedoStep(cmd); |
726 respondToChangedContents(newSelection); | 727 respondToChangedContents(newSelection); |
727 } | 728 } |
728 | 729 |
729 void Editor::reappliedEditing(PassRefPtrWillBeRawPtr<EditCommandComposition> cmd
) | 730 void Editor::reappliedEditing(PassRefPtrWillBeRawPtr<EditCommandComposition> cmd
) |
730 { | 731 { |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1235 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); | 1236 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); |
1236 } | 1237 } |
1237 | 1238 |
1238 void Editor::trace(Visitor* visitor) | 1239 void Editor::trace(Visitor* visitor) |
1239 { | 1240 { |
1240 visitor->trace(m_lastEditCommand); | 1241 visitor->trace(m_lastEditCommand); |
1241 visitor->trace(m_mark); | 1242 visitor->trace(m_mark); |
1242 } | 1243 } |
1243 | 1244 |
1244 } // namespace WebCore | 1245 } // namespace WebCore |
OLD | NEW |