| 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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 } | 1047 } |
| 1048 | 1048 |
| 1049 // TODO(xiaochengh): This function is only used by unit tests. We should move it | 1049 // TODO(xiaochengh): This function is only used by unit tests. We should move it |
| 1050 // to IdleSpellCheckCallback and modify unit tests to cope with idle time spell | 1050 // to IdleSpellCheckCallback and modify unit tests to cope with idle time spell |
| 1051 // checker. | 1051 // checker. |
| 1052 void SpellChecker::cancelCheck() { | 1052 void SpellChecker::cancelCheck() { |
| 1053 m_spellCheckRequester->cancelCheck(); | 1053 m_spellCheckRequester->cancelCheck(); |
| 1054 } | 1054 } |
| 1055 | 1055 |
| 1056 void SpellChecker::documentAttached(Document* document) { | 1056 void SpellChecker::documentAttached(Document* document) { |
| 1057 m_idleSpellCheckCallback->documentAttached(document); | 1057 if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled()) |
| 1058 m_idleSpellCheckCallback->documentAttached(document); |
| 1058 } | 1059 } |
| 1059 | 1060 |
| 1060 DEFINE_TRACE(SpellChecker) { | 1061 DEFINE_TRACE(SpellChecker) { |
| 1061 visitor->trace(m_frame); | 1062 visitor->trace(m_frame); |
| 1062 visitor->trace(m_spellCheckRequester); | 1063 visitor->trace(m_spellCheckRequester); |
| 1063 visitor->trace(m_idleSpellCheckCallback); | 1064 visitor->trace(m_idleSpellCheckCallback); |
| 1064 } | 1065 } |
| 1065 | 1066 |
| 1066 void SpellChecker::prepareForLeakDetection() { | 1067 void SpellChecker::prepareForLeakDetection() { |
| 1067 m_spellCheckRequester->prepareForLeakDetection(); | 1068 m_spellCheckRequester->prepareForLeakDetection(); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 if (!input.isFocusedElementInDocument()) | 1205 if (!input.isFocusedElementInDocument()) |
| 1205 return false; | 1206 return false; |
| 1206 } | 1207 } |
| 1207 } | 1208 } |
| 1208 HTMLElement* element = | 1209 HTMLElement* element = |
| 1209 Traversal<HTMLElement>::firstAncestorOrSelf(*position.anchorNode()); | 1210 Traversal<HTMLElement>::firstAncestorOrSelf(*position.anchorNode()); |
| 1210 return element && element->isSpellCheckingEnabled(); | 1211 return element && element->isSpellCheckingEnabled(); |
| 1211 } | 1212 } |
| 1212 | 1213 |
| 1213 } // namespace blink | 1214 } // namespace blink |
| OLD | NEW |