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

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

Issue 1325563002: Avoid style clobbering in setCompositionFromExistingText. (2nd land) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Release Range on document detach and remove selectionStart/End 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 571bd41c01fa7c92c76d9913332f32406b047976..67c40c2ae0d11483a60905c391a77d210f6830bd 100644
--- a/Source/core/editing/InputMethodController.h
+++ b/Source/core/editing/InputMethodController.h
@@ -27,6 +27,7 @@
#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"
@@ -72,14 +73,8 @@ public:
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();
+ void documentDetached();
PlainTextRange getSelectionOffsets() const;
// Returns true if setting selection to specified offsets, otherwise false.
@@ -100,13 +95,9 @@ private:
friend class SelectionOffsetsScope;
RawPtrWillBeMember<LocalFrame> m_frame;
- 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;
+ RefPtrWillBeMember<Range> m_compositionRange;
+ bool m_isDirty;
+ bool m_hasComposition;
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