| 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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 m_frame.document()->markers().removeMarkers(DocumentMarker::Spelling); | 817 m_frame.document()->markers().removeMarkers(DocumentMarker::Spelling); |
| 818 if (!isContinuousGrammarCheckingEnabled) | 818 if (!isContinuousGrammarCheckingEnabled) |
| 819 m_frame.document()->markers().removeMarkers(DocumentMarker::Grammar); | 819 m_frame.document()->markers().removeMarkers(DocumentMarker::Grammar); |
| 820 } | 820 } |
| 821 | 821 |
| 822 void SpellChecker::removeSpellingMarkers() | 822 void SpellChecker::removeSpellingMarkers() |
| 823 { | 823 { |
| 824 m_frame.document()->markers().removeMarkers(DocumentMarker::MisspellingMarke
rs()); | 824 m_frame.document()->markers().removeMarkers(DocumentMarker::MisspellingMarke
rs()); |
| 825 } | 825 } |
| 826 | 826 |
| 827 void SpellChecker::removeSpellingMarkersUnderWords(const Vector<String>& words) |
| 828 { |
| 829 MarkerRemoverPredicate removerPredicate(words); |
| 830 |
| 831 DocumentMarkerController& markerController = m_frame.document()->markers(); |
| 832 markerController.removeMarkers(removerPredicate); |
| 833 markerController.repaintMarkers(); |
| 834 } |
| 835 |
| 827 void SpellChecker::spellCheckAfterBlur() | 836 void SpellChecker::spellCheckAfterBlur() |
| 828 { | 837 { |
| 829 if (!m_frame.selection().selection().isContentEditable()) | 838 if (!m_frame.selection().selection().isContentEditable()) |
| 830 return; | 839 return; |
| 831 | 840 |
| 832 if (isSelectionInTextField(m_frame.selection().selection())) { | 841 if (isSelectionInTextField(m_frame.selection().selection())) { |
| 833 // textFieldDidEndEditing() and textFieldDidBeginEditing() handle this. | 842 // textFieldDidEndEditing() and textFieldDidBeginEditing() handle this. |
| 834 return; | 843 return; |
| 835 } | 844 } |
| 836 | 845 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 } | 927 } |
| 919 | 928 |
| 920 void SpellChecker::requestTextChecking(const Element& element) | 929 void SpellChecker::requestTextChecking(const Element& element) |
| 921 { | 930 { |
| 922 RefPtrWillBeRawPtr<Range> rangeToCheck = rangeOfContents(const_cast<Element*
>(&element)); | 931 RefPtrWillBeRawPtr<Range> rangeToCheck = rangeOfContents(const_cast<Element*
>(&element)); |
| 923 m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextChec
kingTypeSpelling | TextCheckingTypeGrammar, TextCheckingProcessBatch, rangeToChe
ck, rangeToCheck)); | 932 m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextChec
kingTypeSpelling | TextCheckingTypeGrammar, TextCheckingProcessBatch, rangeToChe
ck, rangeToCheck)); |
| 924 } | 933 } |
| 925 | 934 |
| 926 | 935 |
| 927 } // namespace blink | 936 } // namespace blink |
| OLD | NEW |