+2006-12-05 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin
+
+ Grammar/Spelling code re-homing, baby step one: put isGrammarCheckingEnabled in Editor
+ since that's where isContinousSpellCheckingEnabled lives.
+
+ * editing/Editor.h:
+ * editing/Editor.cpp:
+ (WebCore::Editor::isGrammarCheckingEnabled):
+ new method, calls through to client a la isContinuousSpellCheckingEnabled
+
+ * bridge/mac/FrameMac.mm:
+ (WebCore::FrameMac::advanceToNextMisspelling):
+ call editor() rather than editor()->client()
+ (WebCore::FrameMac::markMisspellings):
+ ditto
+
+ * platform/ContextMenu.cpp:
+ (WebCore::ContextMenu::populate):
+ ditto
+
2006-12-05 Darin Adler <darin@apple.com>
Reviewed by Geoff.
int searchEndOffsetAfterWrap = spellingSearchRange->endOffset(ec);
int misspellingOffset;
- NSString *misspelledWord = findFirstMisspellingInRange(checker, editor()->client()->spellCheckerDocumentTag(), spellingSearchRange.get(), misspellingOffset, false);
+ NSString *misspelledWord = findFirstMisspellingInRange(checker, editor()->spellCheckerDocumentTag(), spellingSearchRange.get(), misspellingOffset, false);
NSString *badGrammarPhrase = nil;
grammarSearchRange->setEnd(chars.range()->startContainer(ec), chars.range()->startOffset(ec), ec);
}
- if (editor()->client()->isGrammarCheckingEnabled())
- badGrammarPhrase = findFirstBadGrammarInRange(checker, editor()->client()->spellCheckerDocumentTag(), grammarSearchRange.get(), grammarDetail, grammarPhraseOffset, false);
+ if (editor()->isGrammarCheckingEnabled())
+ badGrammarPhrase = findFirstBadGrammarInRange(checker, editor()->spellCheckerDocumentTag(), grammarSearchRange.get(), grammarDetail, grammarPhraseOffset, false);
#endif
// If we found neither bad grammar nor a misspelled word, wrap and try again (but don't bother if we started at the beginning of the
// going until the end of the very first chunk we tested is far enough
spellingSearchRange->setEnd(searchEndNodeAfterWrap, searchEndOffsetAfterWrap, ec);
- misspelledWord = findFirstMisspellingInRange(checker, editor()->client()->spellCheckerDocumentTag(), spellingSearchRange.get(), misspellingOffset, false);
+ misspelledWord = findFirstMisspellingInRange(checker, editor()->spellCheckerDocumentTag(), spellingSearchRange.get(), misspellingOffset, false);
#ifndef BUILDING_ON_TIGER
grammarSearchRange = spellingSearchRange->cloneRange(ec);
chars.advance(misspellingOffset);
grammarSearchRange->setEnd(chars.range()->startContainer(ec), chars.range()->startOffset(ec), ec);
}
- if (editor()->client()->isGrammarCheckingEnabled())
- badGrammarPhrase = findFirstBadGrammarInRange(checker, editor()->client()->spellCheckerDocumentTag(), grammarSearchRange.get(), grammarDetail, grammarPhraseOffset, false);
+ if (editor()->isGrammarCheckingEnabled())
+ badGrammarPhrase = findFirstBadGrammarInRange(checker, editor()->spellCheckerDocumentTag(), grammarSearchRange.get(), grammarDetail, grammarPhraseOffset, false);
#endif
}
markAllMisspellingsInRange(checker, editor()->spellCheckerDocumentTag(), searchRange.get());
#ifndef BUILDING_ON_TIGER
- if (editor()->client()->isGrammarCheckingEnabled())
+ if (editor()->isGrammarCheckingEnabled())
markAllBadGrammarInRange(checker, editor()->spellCheckerDocumentTag(), searchRange.get());
#endif
}