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

Unified Diff: Source/core/editing/InputMethodController.h

Issue 1330233003: Revert of Avoid style clobbering in setCompositionFromExistingText. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/editing/InputMethodController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/InputMethodController.h
diff --git a/Source/core/editing/InputMethodController.h b/Source/core/editing/InputMethodController.h
index 80e9ce9fb6b48d94b450f665cad3aedaaa3d7863..571bd41c01fa7c92c76d9913332f32406b047976 100644
--- a/Source/core/editing/InputMethodController.h
+++ b/Source/core/editing/InputMethodController.h
@@ -27,7 +27,6 @@
#define InputMethodController_h
#include "core/CoreExport.h"
-#include "core/dom/Range.h"
#include "core/editing/CompositionUnderline.h"
#include "core/editing/EphemeralRange.h"
#include "core/editing/PlainTextRange.h"
@@ -73,6 +72,13 @@
EphemeralRange compositionEphemeralRange() const;
PassRefPtrWillBeRawPtr<Range> compositionRange() const;
+ // getting international text input composition state (for use by InlineTextBox)
+ Text* compositionNode() const { return m_compositionNode.get(); }
+ unsigned compositionStart() const { return m_compositionStart; }
+ unsigned compositionEnd() const { return m_compositionEnd; }
+ bool compositionUsesCustomUnderlines() const { return !m_customCompositionUnderlines.isEmpty(); }
+ const Vector<CompositionUnderline>& customCompositionUnderlines() const { return m_customCompositionUnderlines; }
+
void clear();
PlainTextRange getSelectionOffsets() const;
@@ -94,9 +100,13 @@
friend class SelectionOffsetsScope;
RawPtrWillBeMember<LocalFrame> m_frame;
- RefPtrWillBeMember<Range> m_compositionRange;
- bool m_isDirty;
- bool m_hasComposition;
+ RefPtrWillBeMember<Text> m_compositionNode;
+ // We don't use PlainTextRange which is immutable, for composition range.
+ unsigned m_compositionStart;
+ unsigned m_compositionEnd;
+ // startOffset and endOffset of CompositionUnderline are based on
+ // m_compositionNode.
+ Vector<CompositionUnderline> m_customCompositionUnderlines;
explicit InputMethodController(LocalFrame&);
« no previous file with comments | « Source/core/editing/FrameSelection.cpp ('k') | Source/core/editing/InputMethodController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698