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

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

Issue 2925363002: Add SpellChecker::GetSpellCheckMarkerTouchingSelection() (Closed)
Patch Set: Respond to commments Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22 matching lines...) Expand all
33 #include "platform/heap/Handle.h" 33 #include "platform/heap/Handle.h"
34 #include "platform/text/TextChecking.h" 34 #include "platform/text/TextChecking.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class CompositeEditCommand; 38 class CompositeEditCommand;
39 class IdleSpellCheckCallback; 39 class IdleSpellCheckCallback;
40 class LocalFrame; 40 class LocalFrame;
41 class ReplaceSelectionCommand; 41 class ReplaceSelectionCommand;
42 class SpellCheckerClient; 42 class SpellCheckerClient;
43 class SpellCheckMarker;
43 class SpellCheckRequest; 44 class SpellCheckRequest;
44 class SpellCheckRequester; 45 class SpellCheckRequester;
45 class TextCheckerClient; 46 class TextCheckerClient;
46 class TextCheckingParagraph; 47 class TextCheckingParagraph;
47 struct TextCheckingResult; 48 struct TextCheckingResult;
48 class TypingCommand; 49 class TypingCommand;
49 50
50 class CORE_EXPORT SpellChecker final : public GarbageCollected<SpellChecker> { 51 class CORE_EXPORT SpellChecker final : public GarbageCollected<SpellChecker> {
51 WTF_MAKE_NONCOPYABLE(SpellChecker); 52 WTF_MAKE_NONCOPYABLE(SpellChecker);
52 53
(...skipping 12 matching lines...) Expand all
65 bool IsSpellCheckingEnabledInFocusedNode() const; 66 bool IsSpellCheckingEnabledInFocusedNode() const;
66 void MarkMisspellingsAfterApplyingCommand(const CompositeEditCommand&); 67 void MarkMisspellingsAfterApplyingCommand(const CompositeEditCommand&);
67 void MarkAndReplaceFor(SpellCheckRequest*, const Vector<TextCheckingResult>&); 68 void MarkAndReplaceFor(SpellCheckRequest*, const Vector<TextCheckingResult>&);
68 void AdvanceToNextMisspelling(bool start_before_selection); 69 void AdvanceToNextMisspelling(bool start_before_selection);
69 void ShowSpellingGuessPanel(); 70 void ShowSpellingGuessPanel();
70 void DidBeginEditing(Element*); 71 void DidBeginEditing(Element*);
71 void MarkMisspellingsForMovingParagraphs(const VisibleSelection&); 72 void MarkMisspellingsForMovingParagraphs(const VisibleSelection&);
72 void RespondToChangedContents(); 73 void RespondToChangedContents();
73 void RespondToChangedSelection(const Position& old_selection_start, 74 void RespondToChangedSelection(const Position& old_selection_start,
74 FrameSelection::SetSelectionOptions); 75 FrameSelection::SetSelectionOptions);
76 Optional<std::pair<Node*, SpellCheckMarker*>>
77 GetSpellCheckMarkerTouchingSelection();
75 void ReplaceMisspelledRange(const String&); 78 void ReplaceMisspelledRange(const String&);
76 void RemoveSpellingMarkers(); 79 void RemoveSpellingMarkers();
77 void RemoveSpellingMarkersUnderWords(const Vector<String>& words); 80 void RemoveSpellingMarkersUnderWords(const Vector<String>& words);
78 enum class ElementsType { kAll, kOnlyNonEditable }; 81 enum class ElementsType { kAll, kOnlyNonEditable };
79 void RemoveSpellingAndGrammarMarkers(const HTMLElement&, 82 void RemoveSpellingAndGrammarMarkers(const HTMLElement&,
80 ElementsType = ElementsType::kAll); 83 ElementsType = ElementsType::kAll);
81 void SpellCheckAfterBlur(); 84 void SpellCheckAfterBlur();
82 85
83 void DidEndEditingOnTextField(Element*); 86 void DidEndEditingOnTextField(Element*);
84 bool SelectionStartHasMarkerFor(DocumentMarker::MarkerType, 87 bool SelectionStartHasMarkerFor(DocumentMarker::MarkerType,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 137
135 Member<LocalFrame> frame_; 138 Member<LocalFrame> frame_;
136 139
137 const Member<SpellCheckRequester> spell_check_requester_; 140 const Member<SpellCheckRequester> spell_check_requester_;
138 const Member<IdleSpellCheckCallback> idle_spell_check_callback_; 141 const Member<IdleSpellCheckCallback> idle_spell_check_callback_;
139 }; 142 };
140 143
141 } // namespace blink 144 } // namespace blink
142 145
143 #endif // SpellChecker_h 146 #endif // SpellChecker_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698