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

Unified Diff: Source/core/events/CompositionEvent.cpp

Issue 1162853002: Remove IME API from Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove interface in WebWidgets.h Created 5 years, 7 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/events/CompositionEvent.h ('k') | Source/core/events/CompositionEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/CompositionEvent.cpp
diff --git a/Source/core/events/CompositionEvent.cpp b/Source/core/events/CompositionEvent.cpp
index 5936d23880791742fb5c338fcf1a5cd43e3d631d..928d764469377fcde8a72b782cb04b70ad43d55d 100644
--- a/Source/core/events/CompositionEvent.cpp
+++ b/Source/core/events/CompositionEvent.cpp
@@ -30,29 +30,20 @@
namespace blink {
CompositionEvent::CompositionEvent()
- : m_activeSegmentStart(0)
- , m_activeSegmentEnd(0)
{
- initializeSegments();
}
-CompositionEvent::CompositionEvent(const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView> view, const String& data, const Vector<CompositionUnderline>& underlines)
+CompositionEvent::CompositionEvent(const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView> view, const String& data)
: UIEvent(type, true, true, view, 0)
, m_data(data)
- , m_activeSegmentStart(0)
- , m_activeSegmentEnd(0)
{
- initializeSegments(&underlines);
}
CompositionEvent::CompositionEvent(const AtomicString& type, const CompositionEventInit& initializer)
: UIEvent(type, initializer)
- , m_activeSegmentStart(0)
- , m_activeSegmentEnd(0)
{
if (initializer.hasData())
m_data = initializer.data();
- initializeSegments();
}
CompositionEvent::~CompositionEvent()
@@ -67,29 +58,6 @@ void CompositionEvent::initCompositionEvent(const AtomicString& type, bool canBu
initUIEvent(type, canBubble, cancelable, view, 0);
m_data = data;
- initializeSegments();
-}
-
-void CompositionEvent::initializeSegments(const Vector<CompositionUnderline>* underlines)
-{
- m_activeSegmentStart = 0;
- m_activeSegmentEnd = m_data.length();
-
- if (!underlines || !underlines->size()) {
- m_segments.append(0);
- return;
- }
-
- for (const auto& underline : *underlines) {
- if (underline.thick) {
- m_activeSegmentStart = underline.startOffset;
- m_activeSegmentEnd = underline.endOffset;
- break;
- }
- }
-
- for (const auto& underline : *underlines)
- m_segments.append(underline.startOffset);
}
const AtomicString& CompositionEvent::interfaceName() const
« no previous file with comments | « Source/core/events/CompositionEvent.h ('k') | Source/core/events/CompositionEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698