| 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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 endRoot->dispatchEvent(Event::create(EventTypeNames::webkitEditableConte
ntChanged)); | 699 endRoot->dispatchEvent(Event::create(EventTypeNames::webkitEditableConte
ntChanged)); |
| 700 } | 700 } |
| 701 | 701 |
| 702 void Editor::requestSpellcheckingAfterApplyingCommand(CompositeEditCommand* cmd) | 702 void Editor::requestSpellcheckingAfterApplyingCommand(CompositeEditCommand* cmd) |
| 703 { | 703 { |
| 704 // Note: Request spell checking for and only for |ReplaceSelectionCommand|s | 704 // Note: Request spell checking for and only for |ReplaceSelectionCommand|s |
| 705 // created in |Editor::replaceSelectionWithFragment()|. | 705 // created in |Editor::replaceSelectionWithFragment()|. |
| 706 // TODO(xiaochengh): May also need to do this after dragging crbug.com/29804
6. | 706 // TODO(xiaochengh): May also need to do this after dragging crbug.com/29804
6. |
| 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().isSpellCheckingEnabled()) |
| 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().chunkAndMarkAllMisspellingsAndBadGrammar(cmd->endingSelection
().rootEditableElement(), insertedRange); | 717 spellChecker().chunkAndMarkAllMisspellingsAndBadGrammar(cmd->endingSelection
().rootEditableElement(), insertedRange); |
| 718 } | 718 } |
| 719 | 719 |
| (...skipping 686 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 |