summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/TextEvent.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebCore/dom/TextEvent.h
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebCore/dom/TextEvent.h')
-rw-r--r--Source/WebCore/dom/TextEvent.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebCore/dom/TextEvent.h b/Source/WebCore/dom/TextEvent.h
index 9b0877ad4..f0f93e8f7 100644
--- a/Source/WebCore/dom/TextEvent.h
+++ b/Source/WebCore/dom/TextEvent.h
@@ -27,6 +27,7 @@
#ifndef TextEvent_h
#define TextEvent_h
+#include "DictationAlternative.h"
#include "TextEventInputType.h"
#include "UIEvent.h"
@@ -42,6 +43,7 @@ namespace WebCore {
static PassRefPtr<TextEvent> createForPlainTextPaste(PassRefPtr<AbstractView> view, const String& data, bool shouldSmartReplace);
static PassRefPtr<TextEvent> createForFragmentPaste(PassRefPtr<AbstractView> view, PassRefPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle);
static PassRefPtr<TextEvent> createForDrop(PassRefPtr<AbstractView> view, const String& data);
+ static PassRefPtr<TextEvent> createForDictation(PassRefPtr<AbstractView>, const String& data, const Vector<DictationAlternative>& dictationAlternatives);
virtual ~TextEvent();
@@ -56,10 +58,12 @@ namespace WebCore {
bool isBackTab() const { return m_inputType == TextEventInputBackTab; }
bool isPaste() const { return m_inputType == TextEventInputPaste; }
bool isDrop() const { return m_inputType == TextEventInputDrop; }
+ bool isDictation() const { return m_inputType == TextEventInputDictation; }
bool shouldSmartReplace() const { return m_shouldSmartReplace; }
bool shouldMatchStyle() const { return m_shouldMatchStyle; }
DocumentFragment* pastingFragment() const { return m_pastingFragment.get(); }
+ const Vector<DictationAlternative>& dictationAlternatives() const { return m_dictationAlternatives; }
private:
TextEvent();
@@ -67,6 +71,7 @@ namespace WebCore {
TextEvent(PassRefPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
TextEvent(PassRefPtr<AbstractView>, const String& data, PassRefPtr<DocumentFragment>,
bool shouldSmartReplace, bool shouldMatchStyle);
+ TextEvent(PassRefPtr<AbstractView>, const String& data, const Vector<DictationAlternative>& dictationAlternatives);
TextEventInputType m_inputType;
String m_data;
@@ -74,6 +79,7 @@ namespace WebCore {
RefPtr<DocumentFragment> m_pastingFragment;
bool m_shouldSmartReplace;
bool m_shouldMatchStyle;
+ Vector<DictationAlternative> m_dictationAlternatives;
};
} // namespace WebCore