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

Side by Side Diff: sky/engine/core/editing/SpellChecker.cpp

Issue 840403003: First pass at deleting paint invalidation code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/editing/Editor.cpp ('k') | sky/engine/core/frame/FrameView.cpp » ('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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 { 772 {
773 m_frame.document()->markers().removeMarkers(DocumentMarker::MisspellingMarke rs()); 773 m_frame.document()->markers().removeMarkers(DocumentMarker::MisspellingMarke rs());
774 } 774 }
775 775
776 void SpellChecker::removeSpellingMarkersUnderWords(const Vector<String>& words) 776 void SpellChecker::removeSpellingMarkersUnderWords(const Vector<String>& words)
777 { 777 {
778 MarkerRemoverPredicate removerPredicate(words); 778 MarkerRemoverPredicate removerPredicate(words);
779 779
780 DocumentMarkerController& markerController = m_frame.document()->markers(); 780 DocumentMarkerController& markerController = m_frame.document()->markers();
781 markerController.removeMarkers(removerPredicate); 781 markerController.removeMarkers(removerPredicate);
782 markerController.repaintMarkers();
783 } 782 }
784 783
785 void SpellChecker::spellCheckAfterBlur() 784 void SpellChecker::spellCheckAfterBlur()
786 { 785 {
787 if (!m_frame.selection().selection().isContentEditable()) 786 if (!m_frame.selection().selection().isContentEditable())
788 return; 787 return;
789 788
790 if (isSelectionInTextField(m_frame.selection().selection())) { 789 if (isSelectionInTextField(m_frame.selection().selection())) {
791 // textFieldDidEndEditing() and textFieldDidBeginEditing() handle this. 790 // textFieldDidEndEditing() and textFieldDidBeginEditing() handle this.
792 return; 791 return;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 } 873 }
875 874
876 void SpellChecker::requestTextChecking(const Element& element) 875 void SpellChecker::requestTextChecking(const Element& element)
877 { 876 {
878 RefPtr<Range> rangeToCheck = rangeOfContents(const_cast<Element*>(&element)) ; 877 RefPtr<Range> rangeToCheck = rangeOfContents(const_cast<Element*>(&element)) ;
879 m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextChec kingTypeSpelling | TextCheckingTypeGrammar, TextCheckingProcessBatch, rangeToChe ck, rangeToCheck)); 878 m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextChec kingTypeSpelling | TextCheckingTypeGrammar, TextCheckingProcessBatch, rangeToChe ck, rangeToCheck));
880 } 879 }
881 880
882 881
883 } // namespace blink 882 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/editing/Editor.cpp ('k') | sky/engine/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698