Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(623)

Side by Side Diff: Source/core/editing/SpellChecker.h

Issue 224113002: Oilpan: move Range object to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use STACK_ALLOCATED() + incorporate ager's overview of macros in this area. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 SpellCheckerClient& spellCheckerClient() const; 52 SpellCheckerClient& spellCheckerClient() const;
53 TextCheckerClient& textChecker() const; 53 TextCheckerClient& textChecker() const;
54 54
55 bool isContinuousSpellCheckingEnabled() const; 55 bool isContinuousSpellCheckingEnabled() const;
56 void toggleContinuousSpellChecking(); 56 void toggleContinuousSpellChecking();
57 bool isGrammarCheckingEnabled(); 57 bool isGrammarCheckingEnabled();
58 void ignoreSpelling(); 58 void ignoreSpelling();
59 bool isSpellCheckingEnabledInFocusedNode() const; 59 bool isSpellCheckingEnabledInFocusedNode() const;
60 bool isSpellCheckingEnabledFor(Node*) const; 60 bool isSpellCheckingEnabledFor(Node*) const;
61 void markMisspellingsAfterTypingToWord(const VisiblePosition &wordStart, con st VisibleSelection& selectionAfterTyping); 61 void markMisspellingsAfterTypingToWord(const VisiblePosition &wordStart, con st VisibleSelection& selectionAfterTyping);
62 void markMisspellings(const VisibleSelection&, RefPtr<Range>& firstMisspelli ngRange); 62 void markMisspellings(const VisibleSelection&, RefPtrWillBeRawPtr<Range>& fi rstMisspellingRange);
63 void markBadGrammar(const VisibleSelection&); 63 void markBadGrammar(const VisibleSelection&);
64 void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection , bool markGrammar, const VisibleSelection& grammarSelection); 64 void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection , bool markGrammar, const VisibleSelection& grammarSelection);
65 void markAndReplaceFor(PassRefPtr<SpellCheckRequest>, const Vector<TextCheck ingResult>&); 65 void markAndReplaceFor(PassRefPtr<SpellCheckRequest>, const Vector<TextCheck ingResult>&);
66 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask, Range* s pellingRange, Range* grammarRange); 66 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask, Range* s pellingRange, Range* grammarRange);
67 void advanceToNextMisspelling(bool startBeforeSelection = false); 67 void advanceToNextMisspelling(bool startBeforeSelection = false);
68 void showSpellingGuessPanel(); 68 void showSpellingGuessPanel();
69 void didBeginEditing(Element*); 69 void didBeginEditing(Element*);
70 void clearMisspellingsAndBadGrammar(const VisibleSelection&); 70 void clearMisspellingsAndBadGrammar(const VisibleSelection&);
71 void markMisspellingsAndBadGrammar(const VisibleSelection&); 71 void markMisspellingsAndBadGrammar(const VisibleSelection&);
72 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe lection::SetSelectionOptions); 72 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe lection::SetSelectionOptions);
73 void spellCheckAfterBlur(); 73 void spellCheckAfterBlur();
74 void spellCheckOldSelection(const VisibleSelection& oldSelection, const Visi bleSelection& newAdjacentWords, const VisibleSelection& newSelectedSentence); 74 void spellCheckOldSelection(const VisibleSelection& oldSelection, const Visi bleSelection& newAdjacentWords, const VisibleSelection& newSelectedSentence);
75 75
76 void didEndEditingOnTextField(Element*); 76 void didEndEditingOnTextField(Element*);
77 bool selectionStartHasMarkerFor(DocumentMarker::MarkerType, int from, int le ngth) const; 77 bool selectionStartHasMarkerFor(DocumentMarker::MarkerType, int from, int le ngth) const;
78 void updateMarkersForWordsAffectedByEditing(bool onlyHandleWordsContainingSe lection); 78 void updateMarkersForWordsAffectedByEditing(bool onlyHandleWordsContainingSe lection);
79 void cancelCheck(); 79 void cancelCheck();
80 void chunkAndMarkAllMisspellingsAndBadGrammar(Node*); 80 void chunkAndMarkAllMisspellingsAndBadGrammar(Node*);
81 void requestTextChecking(const Element&); 81 void requestTextChecking(const Element&);
82 82
83 // Exposed for testing only 83 // Exposed for testing only
84 SpellCheckRequester& spellCheckRequester() const { return *m_spellCheckReque ster; } 84 SpellCheckRequester& spellCheckRequester() const { return *m_spellCheckReque ster; }
85 85
86 private: 86 private:
87 LocalFrame& m_frame; 87 LocalFrame& m_frame;
88 const OwnPtr<SpellCheckRequester> m_spellCheckRequester; 88 const OwnPtr<SpellCheckRequester> m_spellCheckRequester;
89 89
90 explicit SpellChecker(LocalFrame&); 90 explicit SpellChecker(LocalFrame&);
91 91
92 void markMisspellingsOrBadGrammar(const VisibleSelection&, bool checkSpellin g, RefPtr<Range>& firstMisspellingRange); 92 void markMisspellingsOrBadGrammar(const VisibleSelection&, bool checkSpellin g, RefPtrWillBeRawPtr<Range>& firstMisspellingRange);
93 TextCheckingTypeMask resolveTextCheckingTypeMask(TextCheckingTypeMask); 93 TextCheckingTypeMask resolveTextCheckingTypeMask(TextCheckingTypeMask);
94 94
95 bool unifiedTextCheckerEnabled() const; 95 bool unifiedTextCheckerEnabled() const;
96 96
97 void chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask textCheck ingOptions, const TextCheckingParagraph& fullParagraphToCheck, bool asynchronous ); 97 void chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask textCheck ingOptions, const TextCheckingParagraph& fullParagraphToCheck, bool asynchronous );
98 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask textCheck ingOptions, Range* checkingRange, Range* paragraphRange, bool asynchronous, int requestNumber, int* checkingLength = 0); 98 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask textCheck ingOptions, Range* checkingRange, Range* paragraphRange, bool asynchronous, int requestNumber, int* checkingLength = 0);
99 }; 99 };
100 100
101 } // namespace WebCore 101 } // namespace WebCore
102 102
103 #endif // SpellChecker_h 103 #endif // SpellChecker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698