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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 return client; | 102 return client; |
103 } | 103 } |
104 | 104 |
105 SpellCheckerClient& SpellChecker::spellCheckerClient() const { | 105 SpellCheckerClient& SpellChecker::spellCheckerClient() const { |
106 if (Page* page = frame().page()) | 106 if (Page* page = frame().page()) |
107 return page->spellCheckerClient(); | 107 return page->spellCheckerClient(); |
108 return emptySpellCheckerClient(); | 108 return emptySpellCheckerClient(); |
109 } | 109 } |
110 | 110 |
111 TextCheckerClient& SpellChecker::textChecker() const { | 111 TextCheckerClient& SpellChecker::textChecker() const { |
112 return spellCheckerClient().textChecker(); | 112 return frame().client()->textCheckerClient(); |
113 } | 113 } |
114 | 114 |
115 SpellChecker::SpellChecker(LocalFrame& frame) | 115 SpellChecker::SpellChecker(LocalFrame& frame) |
116 : m_frame(&frame), | 116 : m_frame(&frame), |
117 m_spellCheckRequester(SpellCheckRequester::create(frame)), | 117 m_spellCheckRequester(SpellCheckRequester::create(frame)), |
118 m_idleSpellCheckCallback(IdleSpellCheckCallback::create(frame)) {} | 118 m_idleSpellCheckCallback(IdleSpellCheckCallback::create(frame)) {} |
119 | 119 |
120 bool SpellChecker::isSpellCheckingEnabled() const { | 120 bool SpellChecker::isSpellCheckingEnabled() const { |
121 return spellCheckerClient().isSpellCheckingEnabled(); | 121 return spellCheckerClient().isSpellCheckingEnabled(); |
122 } | 122 } |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 if (!input.isFocusedElementInDocument()) | 1176 if (!input.isFocusedElementInDocument()) |
1177 return false; | 1177 return false; |
1178 } | 1178 } |
1179 } | 1179 } |
1180 HTMLElement* element = | 1180 HTMLElement* element = |
1181 Traversal<HTMLElement>::firstAncestorOrSelf(*position.anchorNode()); | 1181 Traversal<HTMLElement>::firstAncestorOrSelf(*position.anchorNode()); |
1182 return element && element->isSpellCheckingEnabled(); | 1182 return element && element->isSpellCheckingEnabled(); |
1183 } | 1183 } |
1184 | 1184 |
1185 } // namespace blink | 1185 } // namespace blink |
OLD | NEW |