| 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 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 } | 1035 } |
| 1036 | 1036 |
| 1037 // TODO(xiaochengh): This function is only used by unit tests. We should move it | 1037 // TODO(xiaochengh): This function is only used by unit tests. We should move it |
| 1038 // to IdleSpellCheckCallback and modify unit tests to cope with idle time spell | 1038 // to IdleSpellCheckCallback and modify unit tests to cope with idle time spell |
| 1039 // checker. | 1039 // checker. |
| 1040 void SpellChecker::cancelCheck() { | 1040 void SpellChecker::cancelCheck() { |
| 1041 m_spellCheckRequester->cancelCheck(); | 1041 m_spellCheckRequester->cancelCheck(); |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 void SpellChecker::documentAttached(Document* document) { | 1044 void SpellChecker::documentAttached(Document* document) { |
| 1045 m_idleSpellCheckCallback->documentAttached(document); | 1045 if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled()) |
| 1046 m_idleSpellCheckCallback->documentAttached(document); |
| 1046 } | 1047 } |
| 1047 | 1048 |
| 1048 DEFINE_TRACE(SpellChecker) { | 1049 DEFINE_TRACE(SpellChecker) { |
| 1049 visitor->trace(m_frame); | 1050 visitor->trace(m_frame); |
| 1050 visitor->trace(m_spellCheckRequester); | 1051 visitor->trace(m_spellCheckRequester); |
| 1051 visitor->trace(m_idleSpellCheckCallback); | 1052 visitor->trace(m_idleSpellCheckCallback); |
| 1052 } | 1053 } |
| 1053 | 1054 |
| 1054 void SpellChecker::prepareForLeakDetection() { | 1055 void SpellChecker::prepareForLeakDetection() { |
| 1055 m_spellCheckRequester->prepareForLeakDetection(); | 1056 m_spellCheckRequester->prepareForLeakDetection(); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 if (!input.isFocusedElementInDocument()) | 1190 if (!input.isFocusedElementInDocument()) |
| 1190 return false; | 1191 return false; |
| 1191 } | 1192 } |
| 1192 } | 1193 } |
| 1193 HTMLElement* element = | 1194 HTMLElement* element = |
| 1194 Traversal<HTMLElement>::firstAncestorOrSelf(*position.anchorNode()); | 1195 Traversal<HTMLElement>::firstAncestorOrSelf(*position.anchorNode()); |
| 1195 return element && element->isSpellCheckingEnabled(); | 1196 return element && element->isSpellCheckingEnabled(); |
| 1196 } | 1197 } |
| 1197 | 1198 |
| 1198 } // namespace blink | 1199 } // namespace blink |
| OLD | NEW |