OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 TextCheckerClient& textChecker() const; | 56 TextCheckerClient& textChecker() const; |
57 | 57 |
58 bool isContinuousSpellCheckingEnabled() const; | 58 bool isContinuousSpellCheckingEnabled() const; |
59 void toggleContinuousSpellChecking(); | 59 void toggleContinuousSpellChecking(); |
60 bool isGrammarCheckingEnabled(); | 60 bool isGrammarCheckingEnabled(); |
61 void ignoreSpelling(); | 61 void ignoreSpelling(); |
62 bool isSpellCheckingEnabledInFocusedNode() const; | 62 bool isSpellCheckingEnabledInFocusedNode() const; |
63 bool isSpellCheckingEnabledFor(Node*) const; | 63 bool isSpellCheckingEnabledFor(Node*) const; |
64 void markMisspellingsAfterLineBreak(const VisibleSelection& wordSelection); | 64 void markMisspellingsAfterLineBreak(const VisibleSelection& wordSelection); |
65 void markMisspellingsAfterTypingToWord(const VisiblePosition &wordStart, con
st VisibleSelection& selectionAfterTyping); | 65 void markMisspellingsAfterTypingToWord(const VisiblePosition &wordStart, con
st VisibleSelection& selectionAfterTyping); |
66 void markMisspellings(const VisibleSelection&, RefPtrWillBeRawPtr<Range>& fi
rstMisspellingRange); | 66 bool markMisspellings(const VisibleSelection&); |
67 void markBadGrammar(const VisibleSelection&); | 67 void markBadGrammar(const VisibleSelection&); |
68 void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection
, bool markGrammar, const VisibleSelection& grammarSelection); | 68 void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection
, bool markGrammar, const VisibleSelection& grammarSelection); |
69 void markAndReplaceFor(PassRefPtrWillBeRawPtr<SpellCheckRequest>, const Vect
or<TextCheckingResult>&); | 69 void markAndReplaceFor(PassRefPtrWillBeRawPtr<SpellCheckRequest>, const Vect
or<TextCheckingResult>&); |
70 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask, const Ep
hemeralRange& spellingRange, const EphemeralRange& grammarRange); | 70 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask, const Ep
hemeralRange& spellingRange, const EphemeralRange& grammarRange); |
71 void advanceToNextMisspelling(bool startBeforeSelection = false); | 71 void advanceToNextMisspelling(bool startBeforeSelection = false); |
72 void showSpellingGuessPanel(); | 72 void showSpellingGuessPanel(); |
73 void didBeginEditing(Element*); | 73 void didBeginEditing(Element*); |
74 void clearMisspellingsAndBadGrammar(const VisibleSelection&); | 74 void clearMisspellingsAndBadGrammar(const VisibleSelection&); |
75 void markMisspellingsAndBadGrammar(const VisibleSelection&); | 75 void markMisspellingsAndBadGrammar(const VisibleSelection&); |
76 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe
lection::SetSelectionOptions); | 76 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe
lection::SetSelectionOptions); |
(...skipping 16 matching lines...) Expand all Loading... |
93 | 93 |
94 private: | 94 private: |
95 explicit SpellChecker(LocalFrame&); | 95 explicit SpellChecker(LocalFrame&); |
96 | 96 |
97 LocalFrame& frame() const | 97 LocalFrame& frame() const |
98 { | 98 { |
99 ASSERT(m_frame); | 99 ASSERT(m_frame); |
100 return *m_frame; | 100 return *m_frame; |
101 } | 101 } |
102 | 102 |
103 void markMisspellingsOrBadGrammar(const VisibleSelection&, bool checkSpellin
g, RefPtrWillBeRawPtr<Range>& firstMisspellingRange); | 103 bool markMisspellingsOrBadGrammar(const VisibleSelection&, bool checkSpellin
g); |
104 TextCheckingTypeMask resolveTextCheckingTypeMask(TextCheckingTypeMask); | 104 TextCheckingTypeMask resolveTextCheckingTypeMask(TextCheckingTypeMask); |
105 | 105 |
106 void removeMarkers(const VisibleSelection&, DocumentMarker::MarkerTypes); | 106 void removeMarkers(const VisibleSelection&, DocumentMarker::MarkerTypes); |
107 bool unifiedTextCheckerEnabled() const; | 107 bool unifiedTextCheckerEnabled() const; |
108 | 108 |
109 void chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask textCheck
ingOptions, const TextCheckingParagraph& fullParagraphToCheck, bool asynchronous
); | 109 void chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask textCheck
ingOptions, const TextCheckingParagraph& fullParagraphToCheck, bool asynchronous
); |
110 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask textCheck
ingOptions, Range* checkingRange, Range* paragraphRange, bool asynchronous, int
requestNumber, int* checkingLength = 0); | 110 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask textCheck
ingOptions, const EphemeralRange& checkingRange, const EphemeralRange& paragraph
Range, bool asynchronous, int requestNumber, int* checkingLength = 0); |
111 | 111 |
112 RawPtrWillBeMember<LocalFrame> m_frame; | 112 RawPtrWillBeMember<LocalFrame> m_frame; |
113 const OwnPtrWillBeMember<SpellCheckRequester> m_spellCheckRequester; | 113 const OwnPtrWillBeMember<SpellCheckRequester> m_spellCheckRequester; |
114 }; | 114 }; |
115 | 115 |
116 } // namespace blink | 116 } // namespace blink |
117 | 117 |
118 #endif // SpellChecker_h | 118 #endif // SpellChecker_h |
OLD | NEW |