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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 void didEndEditingOnTextField(Element*); | 78 void didEndEditingOnTextField(Element*); |
79 bool selectionStartHasMarkerFor(DocumentMarker::MarkerType, | 79 bool selectionStartHasMarkerFor(DocumentMarker::MarkerType, |
80 int from, | 80 int from, |
81 int length) const; | 81 int length) const; |
82 bool selectionStartHasSpellingMarkerFor(int from, int length) const; | 82 bool selectionStartHasSpellingMarkerFor(int from, int length) const; |
83 void updateMarkersForWordsAffectedByEditing( | 83 void updateMarkersForWordsAffectedByEditing( |
84 bool onlyHandleWordsContainingSelection); | 84 bool onlyHandleWordsContainingSelection); |
85 void cancelCheck(); | 85 void cancelCheck(); |
86 | 86 |
87 // Exposed for testing only | 87 // Exposed for testing and idle time spell checker |
88 SpellCheckRequester& spellCheckRequester() const { | 88 SpellCheckRequester& spellCheckRequester() const { |
89 return *m_spellCheckRequester; | 89 return *m_spellCheckRequester; |
90 } | 90 } |
91 | 91 |
92 // The leak detector will report leaks should queued requests be posted | 92 // The leak detector will report leaks should queued requests be posted |
93 // while it GCs repeatedly, as the requests keep their associated element | 93 // while it GCs repeatedly, as the requests keep their associated element |
94 // alive. | 94 // alive. |
95 // | 95 // |
96 // Hence allow the leak detector to effectively stop the spell checker to | 96 // Hence allow the leak detector to effectively stop the spell checker to |
97 // ensure leak reporting stability. | 97 // ensure leak reporting stability. |
(...skipping 19 matching lines...) Expand all Loading... |
117 | 117 |
118 void removeMarkers(const VisibleSelection&, DocumentMarker::MarkerTypes); | 118 void removeMarkers(const VisibleSelection&, DocumentMarker::MarkerTypes); |
119 | 119 |
120 void markMisspellingsInternal(const VisibleSelection&); | 120 void markMisspellingsInternal(const VisibleSelection&); |
121 void chunkAndMarkAllMisspellings( | 121 void chunkAndMarkAllMisspellings( |
122 const TextCheckingParagraph& fullParagraphToCheck); | 122 const TextCheckingParagraph& fullParagraphToCheck); |
123 void spellCheckOldSelection(const Position& oldSelectionStart, | 123 void spellCheckOldSelection(const Position& oldSelectionStart, |
124 const VisibleSelection& newAdjacentWords); | 124 const VisibleSelection& newAdjacentWords); |
125 | 125 |
126 Member<LocalFrame> m_frame; | 126 Member<LocalFrame> m_frame; |
| 127 |
| 128 // TODO(xiaochengh): Move it to IdleSpellCheckCallback after idle time spell |
| 129 // checking reaches status=stable. |
127 const Member<SpellCheckRequester> m_spellCheckRequester; | 130 const Member<SpellCheckRequester> m_spellCheckRequester; |
128 }; | 131 }; |
129 | 132 |
130 } // namespace blink | 133 } // namespace blink |
131 | 134 |
132 #endif // SpellChecker_h | 135 #endif // SpellChecker_h |
OLD | NEW |