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

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

Issue 1174683004: Populates sourceDevice attribute into MouseEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Create a new init function Created 5 years, 6 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: Source/core/events/UIEvent.cpp
diff --git a/Source/core/events/UIEvent.cpp b/Source/core/events/UIEvent.cpp
index 7ec400e78f1de72f1d93e1205ad904e35e69bd1a..d68ad06588c3117e6b1880fd03b276d31698f072 100644
--- a/Source/core/events/UIEvent.cpp
+++ b/Source/core/events/UIEvent.cpp
@@ -53,7 +53,7 @@ UIEvent::~UIEvent()
{
}
-void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg, PassRefPtrWillBeRawPtr<AbstractView> viewArg, int detailArg)
+void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg, PassRefPtrWillBeRawPtr<AbstractView> viewArg, int detailArg, InputDevice* sourceDevice)
{
if (dispatched())
return;
@@ -62,7 +62,12 @@ void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool c
m_view = viewArg;
m_detail = detailArg;
- m_sourceDevice = nullptr;
+ m_sourceDevice = sourceDevice;
+}
+
+void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg, PassRefPtrWillBeRawPtr<AbstractView> viewArg, int detailArg)
+{
+ initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, nullptr);
}
bool UIEvent::isUIEvent() const

Powered by Google App Engine
This is Rietveld 408576698