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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 } | 110 } |
111 | 111 |
112 void SpellChecker::toggleContinuousSpellChecking() | 112 void SpellChecker::toggleContinuousSpellChecking() |
113 { | 113 { |
114 spellCheckerClient().toggleContinuousSpellChecking(); | 114 spellCheckerClient().toggleContinuousSpellChecking(); |
115 if (isContinuousSpellCheckingEnabled()) | 115 if (isContinuousSpellCheckingEnabled()) |
116 return; | 116 return; |
117 for (Frame* frame = this->frame().page()->mainFrame(); frame; frame = frame-
>tree().traverseNext()) { | 117 for (Frame* frame = this->frame().page()->mainFrame(); frame; frame = frame-
>tree().traverseNext()) { |
118 if (!frame->isLocalFrame()) | 118 if (!frame->isLocalFrame()) |
119 continue; | 119 continue; |
120 for (Node& node : NodeTraversal::from(&toLocalFrame(frame)->document()->
rootNode())) | 120 for (Node& node : NodeTraversal::startsAt(&toLocalFrame(frame)->document
()->rootNode())) |
121 node.setAlreadySpellChecked(false); | 121 node.setAlreadySpellChecked(false); |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 bool SpellChecker::isGrammarCheckingEnabled() | 125 bool SpellChecker::isGrammarCheckingEnabled() |
126 { | 126 { |
127 return spellCheckerClient().isGrammarCheckingEnabled(); | 127 return spellCheckerClient().isGrammarCheckingEnabled(); |
128 } | 128 } |
129 | 129 |
130 void SpellChecker::didBeginEditing(Element* element) | 130 void SpellChecker::didBeginEditing(Element* element) |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextChec
kingTypeSpelling | TextCheckingTypeGrammar, TextCheckingProcessBatch, rangeToChe
ck, rangeToCheck)); | 939 m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextChec
kingTypeSpelling | TextCheckingTypeGrammar, TextCheckingProcessBatch, rangeToChe
ck, rangeToCheck)); |
940 } | 940 } |
941 | 941 |
942 void SpellChecker::trace(Visitor* visitor) | 942 void SpellChecker::trace(Visitor* visitor) |
943 { | 943 { |
944 visitor->trace(m_frame); | 944 visitor->trace(m_frame); |
945 visitor->trace(m_spellCheckRequester); | 945 visitor->trace(m_spellCheckRequester); |
946 } | 946 } |
947 | 947 |
948 } // namespace blink | 948 } // namespace blink |
OLD | NEW |