| Index: Source/core/events/TextEvent.h
|
| diff --git a/Source/core/events/TextEvent.h b/Source/core/events/TextEvent.h
|
| index 87c1c85da33a054b8762e4aa0a137e47238edc9c..57615c0311e7db86eb87fcb1b6ae947e2af134ba 100644
|
| --- a/Source/core/events/TextEvent.h
|
| +++ b/Source/core/events/TextEvent.h
|
| @@ -32,50 +32,49 @@
|
|
|
| namespace blink {
|
|
|
| - class DocumentFragment;
|
| +class DocumentFragment;
|
|
|
| - class TextEvent FINAL : public UIEvent {
|
| - public:
|
| +class TextEvent FINAL : public UIEvent {
|
| + DEFINE_WRAPPERTYPEINFO();
|
| +public:
|
| + static PassRefPtrWillBeRawPtr<TextEvent> create();
|
| + static PassRefPtrWillBeRawPtr<TextEvent> create(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
|
| + static PassRefPtrWillBeRawPtr<TextEvent> createForPlainTextPaste(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, bool shouldSmartReplace);
|
| + static PassRefPtrWillBeRawPtr<TextEvent> createForFragmentPaste(PassRefPtrWillBeRawPtr<AbstractView>, PassRefPtrWillBeRawPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle);
|
| + static PassRefPtrWillBeRawPtr<TextEvent> createForDrop(PassRefPtrWillBeRawPtr<AbstractView>, const String& data);
|
|
|
| - static PassRefPtrWillBeRawPtr<TextEvent> create();
|
| - static PassRefPtrWillBeRawPtr<TextEvent> create(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
|
| - static PassRefPtrWillBeRawPtr<TextEvent> createForPlainTextPaste(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, bool shouldSmartReplace);
|
| - static PassRefPtrWillBeRawPtr<TextEvent> createForFragmentPaste(PassRefPtrWillBeRawPtr<AbstractView>, PassRefPtrWillBeRawPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle);
|
| - static PassRefPtrWillBeRawPtr<TextEvent> createForDrop(PassRefPtrWillBeRawPtr<AbstractView>, const String& data);
|
| + virtual ~TextEvent();
|
|
|
| - virtual ~TextEvent();
|
| + void initTextEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>, const String& data);
|
|
|
| - void initTextEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>, const String& data);
|
| + String data() const { return m_data; }
|
|
|
| - String data() const { return m_data; }
|
| + virtual const AtomicString& interfaceName() const OVERRIDE;
|
|
|
| - virtual const AtomicString& interfaceName() const OVERRIDE;
|
| + bool isLineBreak() const { return m_inputType == TextEventInputLineBreak; }
|
| + bool isComposition() const { return m_inputType == TextEventInputComposition; }
|
| + bool isPaste() const { return m_inputType == TextEventInputPaste; }
|
| + bool isDrop() const { return m_inputType == TextEventInputDrop; }
|
|
|
| - bool isLineBreak() const { return m_inputType == TextEventInputLineBreak; }
|
| - bool isComposition() const { return m_inputType == TextEventInputComposition; }
|
| - bool isPaste() const { return m_inputType == TextEventInputPaste; }
|
| - bool isDrop() const { return m_inputType == TextEventInputDrop; }
|
| + bool shouldSmartReplace() const { return m_shouldSmartReplace; }
|
| + bool shouldMatchStyle() const { return m_shouldMatchStyle; }
|
| + DocumentFragment* pastingFragment() const { return m_pastingFragment.get(); }
|
|
|
| - bool shouldSmartReplace() const { return m_shouldSmartReplace; }
|
| - bool shouldMatchStyle() const { return m_shouldMatchStyle; }
|
| - DocumentFragment* pastingFragment() const { return m_pastingFragment.get(); }
|
| + virtual void trace(Visitor*) OVERRIDE;
|
|
|
| - virtual void trace(Visitor*) OVERRIDE;
|
| +private:
|
| + TextEvent();
|
|
|
| - private:
|
| - TextEvent();
|
| + TextEvent(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
|
| + TextEvent(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, PassRefPtrWillBeRawPtr<DocumentFragment>, bool shouldSmartReplace, bool shouldMatchStyle);
|
|
|
| - TextEvent(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
|
| - TextEvent(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, PassRefPtrWillBeRawPtr<DocumentFragment>,
|
| - bool shouldSmartReplace, bool shouldMatchStyle);
|
| + TextEventInputType m_inputType;
|
| + String m_data;
|
|
|
| - TextEventInputType m_inputType;
|
| - String m_data;
|
| -
|
| - RefPtrWillBeMember<DocumentFragment> m_pastingFragment;
|
| - bool m_shouldSmartReplace;
|
| - bool m_shouldMatchStyle;
|
| - };
|
| + RefPtrWillBeMember<DocumentFragment> m_pastingFragment;
|
| + bool m_shouldSmartReplace;
|
| + bool m_shouldMatchStyle;
|
| +};
|
|
|
| inline bool isTextEvent(const Event& event)
|
| {
|
|
|