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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 if (cmd->inputType() != InputEvent::InputType::Paste) | 707 if (cmd->inputType() != InputEvent::InputType::Paste) |
708 return; | 708 return; |
709 if (!spellChecker().isContinuousSpellCheckingEnabled()) | 709 if (!spellChecker().isContinuousSpellCheckingEnabled()) |
710 return; | 710 return; |
711 if (!SpellChecker::isSpellCheckingEnabledFor(cmd->endingSelection())) | 711 if (!SpellChecker::isSpellCheckingEnabledFor(cmd->endingSelection())) |
712 return; | 712 return; |
713 DCHECK(cmd->isReplaceSelectionCommand()); | 713 DCHECK(cmd->isReplaceSelectionCommand()); |
714 const EphemeralRange& insertedRange = toReplaceSelectionCommand(cmd)->insert
edRange(); | 714 const EphemeralRange& insertedRange = toReplaceSelectionCommand(cmd)->insert
edRange(); |
715 if (insertedRange.isNull()) | 715 if (insertedRange.isNull()) |
716 return; | 716 return; |
717 spellChecker().chunkAndMarkAllMisspellings(cmd->endingSelection().rootEditab
leElement(), insertedRange); | 717 spellChecker().chunkAndMarkAllMisspellingsAndBadGrammar(cmd->endingSelection
().rootEditableElement(), insertedRange); |
718 } | 718 } |
719 | 719 |
720 void Editor::appliedEditing(CompositeEditCommand* cmd) | 720 void Editor::appliedEditing(CompositeEditCommand* cmd) |
721 { | 721 { |
722 EventQueueScope scope; | 722 EventQueueScope scope; |
723 frame().document()->updateStyleAndLayout(); | 723 frame().document()->updateStyleAndLayout(); |
724 | 724 |
725 // Request spell checking after pasting before any further DOM change. | 725 // Request spell checking after pasting before any further DOM change. |
726 requestSpellcheckingAfterApplyingCommand(cmd); | 726 requestSpellcheckingAfterApplyingCommand(cmd); |
727 | 727 |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1406 | 1406 |
1407 DEFINE_TRACE(Editor) | 1407 DEFINE_TRACE(Editor) |
1408 { | 1408 { |
1409 visitor->trace(m_frame); | 1409 visitor->trace(m_frame); |
1410 visitor->trace(m_lastEditCommand); | 1410 visitor->trace(m_lastEditCommand); |
1411 visitor->trace(m_undoStack); | 1411 visitor->trace(m_undoStack); |
1412 visitor->trace(m_mark); | 1412 visitor->trace(m_mark); |
1413 } | 1413 } |
1414 | 1414 |
1415 } // namespace blink | 1415 } // namespace blink |
OLD | NEW |