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

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

Issue 2530843003: Introduce InsertIncrementalTextCommand to respect existing style for composition (Closed)
Patch Set: Created 4 years 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void deleteSurroundingText(int before, int after); 103 void deleteSurroundingText(int before, int after);
104 WebTextInputInfo textInputInfo() const; 104 WebTextInputInfo textInputInfo() const;
105 WebTextInputType textInputType() const; 105 WebTextInputType textInputType() const;
106 106
107 private: 107 private:
108 Document& document() const; 108 Document& document() const;
109 bool isAvailable() const; 109 bool isAvailable() const;
110 110
111 Member<LocalFrame> m_frame; 111 Member<LocalFrame> m_frame;
112 Member<Range> m_compositionRange; 112 Member<Range> m_compositionRange;
113 bool m_isDirty;
114 bool m_hasComposition; 113 bool m_hasComposition;
115 114
116 explicit InputMethodController(LocalFrame&); 115 explicit InputMethodController(LocalFrame&);
117 116
118 Editor& editor() const; 117 Editor& editor() const;
119 LocalFrame& frame() const { 118 LocalFrame& frame() const {
120 DCHECK(m_frame); 119 DCHECK(m_frame);
121 return *m_frame; 120 return *m_frame;
122 } 121 }
123 122
(...skipping 12 matching lines...) Expand all
136 // Inserts the given text string in the place of the existing composition 135 // Inserts the given text string in the place of the existing composition
137 // and moves caret. Returns true if did replace and moved caret successfully. 136 // and moves caret. Returns true if did replace and moved caret successfully.
138 bool replaceCompositionAndMoveCaret(const String&, int relativeCaretPosition); 137 bool replaceCompositionAndMoveCaret(const String&, int relativeCaretPosition);
139 138
140 // Returns true if moved caret successfully. 139 // Returns true if moved caret successfully.
141 bool moveCaret(int newCaretPosition); 140 bool moveCaret(int newCaretPosition);
142 141
143 PlainTextRange createSelectionRangeForSetComposition(int selectionStart, 142 PlainTextRange createSelectionRangeForSetComposition(int selectionStart,
144 int selectionEnd, 143 int selectionEnd,
145 size_t textLength) const; 144 size_t textLength) const;
146 void setCompositionWithIncrementalText(const String&,
147 const Vector<CompositionUnderline>&,
148 int selectionStart,
149 int selectionEnd);
150 int textInputFlags() const; 145 int textInputFlags() const;
151 WebTextInputMode inputModeOfFocusedElement() const; 146 WebTextInputMode inputModeOfFocusedElement() const;
152 147
153 // Implements |SynchronousMutationObserver|. 148 // Implements |SynchronousMutationObserver|.
154 void contextDestroyed() final; 149 void contextDestroyed() final;
155 }; 150 };
156 151
157 } // namespace blink 152 } // namespace blink
158 153
159 #endif // InputMethodController_h 154 #endif // InputMethodController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698