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

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/TextCheckingHelper.h

Issue 2211813002: Revert removal of grammar checking and marking code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fix Created 4 years, 4 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 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 }; 82 };
83 83
84 class TextCheckingHelper { 84 class TextCheckingHelper {
85 WTF_MAKE_NONCOPYABLE(TextCheckingHelper); 85 WTF_MAKE_NONCOPYABLE(TextCheckingHelper);
86 STACK_ALLOCATED(); 86 STACK_ALLOCATED();
87 public: 87 public:
88 TextCheckingHelper(SpellCheckerClient&, const Position& start, const Positio n& end); 88 TextCheckingHelper(SpellCheckerClient&, const Position& start, const Positio n& end);
89 ~TextCheckingHelper(); 89 ~TextCheckingHelper();
90 90
91 String findFirstMisspelling(int& firstMisspellingOffset, bool markAll); 91 String findFirstMisspelling(int& firstMisspellingOffset, bool markAll);
92 String findFirstMisspellingOrBadGrammar(bool& outIsSpelling, int& outFirstFo undOffset, GrammarDetail& outGrammarDetail);
93 String findFirstBadGrammar(GrammarDetail& outGrammarDetail, int& outGrammarP hraseOffset, bool markAll);
92 bool markAllMisspellings(); 94 bool markAllMisspellings();
95 void markAllBadGrammar();
93 96
94 private: 97 private:
95 SpellCheckerClient* m_client; 98 SpellCheckerClient* m_client;
96 Position m_start; 99 Position m_start;
97 Position m_end; 100 Position m_end;
98 101
102 int findFirstGrammarDetail(const Vector<GrammarDetail>& grammarDetails, int badGrammarPhraseLocation, int startOffset, int endOffset, bool markAll) const;
99 bool unifiedTextCheckerEnabled() const; 103 bool unifiedTextCheckerEnabled() const;
100 }; 104 };
101 105
102 void checkTextOfParagraph(TextCheckerClient&, const String&, TextCheckingTypeMas k, Vector<TextCheckingResult>&); 106 void checkTextOfParagraph(TextCheckerClient&, const String&, TextCheckingTypeMas k, Vector<TextCheckingResult>&);
103 bool unifiedTextCheckerEnabled(const LocalFrame*); 107 bool unifiedTextCheckerEnabled(const LocalFrame*);
104 108
105 } // namespace blink 109 } // namespace blink
106 110
107 #endif // TextCheckingHelper_h 111 #endif // TextCheckingHelper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698