| 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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |