| 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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 if (range.isNull()) | 1032 if (range.isNull()) |
| 1033 return; | 1033 return; |
| 1034 | 1034 |
| 1035 frame().document()->markers().removeMarkers(range, markerTypes); | 1035 frame().document()->markers().removeMarkers(range, markerTypes); |
| 1036 } | 1036 } |
| 1037 | 1037 |
| 1038 void SpellChecker::cancelCheck() { | 1038 void SpellChecker::cancelCheck() { |
| 1039 m_spellCheckRequester->cancelCheck(); | 1039 m_spellCheckRequester->cancelCheck(); |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 void SpellChecker::requestTextChecking(const Element& element) { | |
| 1043 if (!element.isSpellCheckingEnabled()) | |
| 1044 return; | |
| 1045 const EphemeralRange rangeToCheck = EphemeralRange::rangeOfContents(element); | |
| 1046 m_spellCheckRequester->requestCheckingFor( | |
| 1047 SpellCheckRequest::create(rangeToCheck)); | |
| 1048 } | |
| 1049 | |
| 1050 DEFINE_TRACE(SpellChecker) { | 1042 DEFINE_TRACE(SpellChecker) { |
| 1051 visitor->trace(m_frame); | 1043 visitor->trace(m_frame); |
| 1052 visitor->trace(m_spellCheckRequester); | 1044 visitor->trace(m_spellCheckRequester); |
| 1053 } | 1045 } |
| 1054 | 1046 |
| 1055 void SpellChecker::prepareForLeakDetection() { | 1047 void SpellChecker::prepareForLeakDetection() { |
| 1056 m_spellCheckRequester->prepareForLeakDetection(); | 1048 m_spellCheckRequester->prepareForLeakDetection(); |
| 1057 } | 1049 } |
| 1058 | 1050 |
| 1059 Vector<TextCheckingResult> SpellChecker::findMisspellings(const String& text) { | 1051 Vector<TextCheckingResult> SpellChecker::findMisspellings(const String& text) { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 startOfNextParagraph(createVisiblePosition(paragraphEnd)); | 1162 startOfNextParagraph(createVisiblePosition(paragraphEnd)); |
| 1171 paragraphStart = newParagraphStart.toParentAnchoredPosition(); | 1163 paragraphStart = newParagraphStart.toParentAnchoredPosition(); |
| 1172 paragraphEnd = endOfParagraph(newParagraphStart).toParentAnchoredPosition(); | 1164 paragraphEnd = endOfParagraph(newParagraphStart).toParentAnchoredPosition(); |
| 1173 firstIteration = false; | 1165 firstIteration = false; |
| 1174 totalLengthProcessed += currentLength; | 1166 totalLengthProcessed += currentLength; |
| 1175 } | 1167 } |
| 1176 return std::make_pair(firstFoundItem, firstFoundOffset); | 1168 return std::make_pair(firstFoundItem, firstFoundOffset); |
| 1177 } | 1169 } |
| 1178 | 1170 |
| 1179 } // namespace blink | 1171 } // namespace blink |
| OLD | NEW |