| 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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 } | 1071 } |
| 1072 | 1072 |
| 1073 DEFINE_TRACE(SpellChecker) { | 1073 DEFINE_TRACE(SpellChecker) { |
| 1074 visitor->Trace(frame_); | 1074 visitor->Trace(frame_); |
| 1075 visitor->Trace(spell_check_requester_); | 1075 visitor->Trace(spell_check_requester_); |
| 1076 visitor->Trace(idle_spell_check_callback_); | 1076 visitor->Trace(idle_spell_check_callback_); |
| 1077 } | 1077 } |
| 1078 | 1078 |
| 1079 void SpellChecker::PrepareForLeakDetection() { | 1079 void SpellChecker::PrepareForLeakDetection() { |
| 1080 spell_check_requester_->PrepareForLeakDetection(); | 1080 spell_check_requester_->PrepareForLeakDetection(); |
| 1081 if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled()) |
| 1082 idle_spell_check_callback_->Deactivate(); |
| 1081 } | 1083 } |
| 1082 | 1084 |
| 1083 Vector<TextCheckingResult> SpellChecker::FindMisspellings(const String& text) { | 1085 Vector<TextCheckingResult> SpellChecker::FindMisspellings(const String& text) { |
| 1084 Vector<UChar> characters; | 1086 Vector<UChar> characters; |
| 1085 text.AppendTo(characters); | 1087 text.AppendTo(characters); |
| 1086 unsigned length = text.length(); | 1088 unsigned length = text.length(); |
| 1087 | 1089 |
| 1088 TextBreakIterator* iterator = WordBreakIterator(characters.data(), length); | 1090 TextBreakIterator* iterator = WordBreakIterator(characters.data(), length); |
| 1089 if (!iterator) | 1091 if (!iterator) |
| 1090 return Vector<TextCheckingResult>(); | 1092 return Vector<TextCheckingResult>(); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 if (!input.IsFocusedElementInDocument()) | 1222 if (!input.IsFocusedElementInDocument()) |
| 1221 return false; | 1223 return false; |
| 1222 } | 1224 } |
| 1223 } | 1225 } |
| 1224 HTMLElement* element = | 1226 HTMLElement* element = |
| 1225 Traversal<HTMLElement>::FirstAncestorOrSelf(*position.AnchorNode()); | 1227 Traversal<HTMLElement>::FirstAncestorOrSelf(*position.AnchorNode()); |
| 1226 return element && element->IsSpellCheckingEnabled(); | 1228 return element && element->IsSpellCheckingEnabled(); |
| 1227 } | 1229 } |
| 1228 | 1230 |
| 1229 } // namespace blink | 1231 } // namespace blink |
| OLD | NEW |