Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: third_party/WebKit/Source/core/editing/Editor.cpp

Issue 2241293006: Remove parameter node from SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DCHECK Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
707 if (cmd->inputType() != InputEvent::InputType::Paste) 707 if (cmd->inputType() != InputEvent::InputType::Paste)
708 return; 708 return;
709 if (!spellChecker().isSpellCheckingEnabled()) 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 // Patch crrev.com/2241293006 assumes the following equality. Revert if it f ails.
718 DCHECK_EQ(cmd->endingSelection().rootEditableElement(), rootEditableElementO f(insertedRange.startPosition()));
719 spellChecker().chunkAndMarkAllMisspellingsAndBadGrammar(insertedRange);
718 } 720 }
719 721
720 void Editor::appliedEditing(CompositeEditCommand* cmd) 722 void Editor::appliedEditing(CompositeEditCommand* cmd)
721 { 723 {
722 EventQueueScope scope; 724 EventQueueScope scope;
723 frame().document()->updateStyleAndLayout(); 725 frame().document()->updateStyleAndLayout();
724 726
725 // Request spell checking after pasting before any further DOM change. 727 // Request spell checking after pasting before any further DOM change.
726 requestSpellcheckingAfterApplyingCommand(cmd); 728 requestSpellcheckingAfterApplyingCommand(cmd);
727 729
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 1408
1407 DEFINE_TRACE(Editor) 1409 DEFINE_TRACE(Editor)
1408 { 1410 {
1409 visitor->trace(m_frame); 1411 visitor->trace(m_frame);
1410 visitor->trace(m_lastEditCommand); 1412 visitor->trace(m_lastEditCommand);
1411 visitor->trace(m_undoStack); 1413 visitor->trace(m_undoStack);
1412 visitor->trace(m_mark); 1414 visitor->trace(m_mark);
1413 } 1415 }
1414 1416
1415 } // namespace blink 1417 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698