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

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

Issue 2701983002: Implement complete lifecycle transition for IdleSpellCheckCallback (Closed)
Patch Set: Fix compile error Created 3 years, 10 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
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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 return hasEditableStyle(*startContainer) && hasEditableStyle(*endContainer); 734 return hasEditableStyle(*startContainer) && hasEditableStyle(*endContainer);
735 } 735 }
736 736
737 void Editor::respondToChangedContents(const VisibleSelection& endingSelection) { 737 void Editor::respondToChangedContents(const VisibleSelection& endingSelection) {
738 if (frame().settings() && frame().settings()->getAccessibilityEnabled()) { 738 if (frame().settings() && frame().settings()->getAccessibilityEnabled()) {
739 Node* node = endingSelection.start().anchorNode(); 739 Node* node = endingSelection.start().anchorNode();
740 if (AXObjectCache* cache = frame().document()->existingAXObjectCache()) 740 if (AXObjectCache* cache = frame().document()->existingAXObjectCache())
741 cache->handleEditableTextContentChanged(node); 741 cache->handleEditableTextContentChanged(node);
742 } 742 }
743 743
744 spellChecker().updateMarkersForWordsAffectedByEditing(true); 744 spellChecker().respondToChangedContents(endingSelection);
yosin_UTC9 2017/02/25 02:22:56 We may want to rename |respondToChangedContents()|
745 client().respondToChangedContents(); 745 client().respondToChangedContents();
746 } 746 }
747 747
748 void Editor::removeFormattingAndStyle() { 748 void Editor::removeFormattingAndStyle() {
749 DCHECK(frame().document()); 749 DCHECK(frame().document());
750 RemoveFormatCommand::create(*frame().document())->apply(); 750 RemoveFormatCommand::create(*frame().document())->apply();
751 } 751 }
752 752
753 void Editor::registerCommandGroup(CompositeEditCommand* commandGroupWrapper) { 753 void Editor::registerCommandGroup(CompositeEditCommand* commandGroupWrapper) {
754 DCHECK(commandGroupWrapper->isCommandGroupWrapper()); 754 DCHECK(commandGroupWrapper->isCommandGroupWrapper());
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1766 1766
1767 DEFINE_TRACE(Editor) { 1767 DEFINE_TRACE(Editor) {
1768 visitor->trace(m_frame); 1768 visitor->trace(m_frame);
1769 visitor->trace(m_lastEditCommand); 1769 visitor->trace(m_lastEditCommand);
1770 visitor->trace(m_undoStack); 1770 visitor->trace(m_undoStack);
1771 visitor->trace(m_mark); 1771 visitor->trace(m_mark);
1772 visitor->trace(m_typingStyle); 1772 visitor->trace(m_typingStyle);
1773 } 1773 }
1774 1774
1775 } // namespace blink 1775 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698