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

Unified Diff: third_party/WebKit/Source/core/events/InputEvent.h

Issue 2258663003: [InputEvent] Support |deleteByCut|&|insertFromPaste| with |dataTransfer| field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: yosin's review2, fix nits Created 4 years, 4 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
Index: third_party/WebKit/Source/core/events/InputEvent.h
diff --git a/third_party/WebKit/Source/core/events/InputEvent.h b/third_party/WebKit/Source/core/events/InputEvent.h
index 2a002647a6df5dbdf4e7ee988e41b16efaa0aa3c..b35a273318603a6e0d3e8aba0978eb11fe05cceb 100644
--- a/third_party/WebKit/Source/core/events/InputEvent.h
+++ b/third_party/WebKit/Source/core/events/InputEvent.h
@@ -5,6 +5,7 @@
#ifndef InputEvent_h
#define InputEvent_h
+#include "core/clipboard/DataTransfer.h"
#include "core/dom/StaticRange.h"
#include "core/events/InputEventInit.h"
#include "core/events/UIEvent.h"
@@ -30,6 +31,7 @@ public:
InsertOrderedList,
InsertUnorderedList,
InsertHorizontalRule,
+ InsertFromPaste,
// Deletion.
DeleteComposedCharacterForward,
DeleteComposedCharacterBackward,
@@ -39,12 +41,10 @@ public:
DeleteLineForward,
DeleteContentBackward,
DeleteContentForward,
+ DeleteByCut,
// Command.
Undo,
Redo,
- Copy,
- Cut,
- Paste,
// Styling.
Bold,
Italic,
@@ -88,10 +88,12 @@ public:
};
static InputEvent* createBeforeInput(InputType, const String& data, EventCancelable, EventIsComposing, const RangeVector*);
+ static InputEvent* createBeforeInput(InputType, DataTransfer*, EventCancelable, EventIsComposing, const RangeVector*);
static InputEvent* createInput(InputType, const String& data, EventIsComposing, const RangeVector*);
String inputType() const;
const String& data() const { return m_data; }
+ DataTransfer* dataTransfer() const { return m_dataTransfer.get(); }
bool isComposing() const { return m_isComposing; }
// Returns a copy of target ranges during event dispatch, and returns an empty
// vector after dispatch.
@@ -109,6 +111,7 @@ private:
InputType m_inputType;
String m_data;
+ Member<DataTransfer> m_dataTransfer;
bool m_isComposing;
// We have to stored |Range| internally and only expose |StaticRange|, please
// see comments in |InputEventDispatchMediator::dispatchEvent()|.

Powered by Google App Engine
This is Rietveld 408576698