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

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

Issue 1161783006: Populates sourceDevice attribute into TouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/events/TouchEvent.cpp
diff --git a/Source/core/events/TouchEvent.cpp b/Source/core/events/TouchEvent.cpp
index d064db1a6c98436166495eda847ca5629a784b4a..eb312aac268c6db61fe6e64ac325ce22de002b69 100644
--- a/Source/core/events/TouchEvent.cpp
+++ b/Source/core/events/TouchEvent.cpp
@@ -39,15 +39,16 @@ namespace blink {
TouchEvent::TouchEvent()
{
+ sourceDevice()->setFiresTouchEvents(true);
tdresser 2015/06/03 17:50:39 Shouldn't this use touchEventInstance?
}
TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches,
- TouchList* changedTouches, const AtomicString& type,
- PassRefPtrWillBeRawPtr<AbstractView> view,
- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable, bool causesScrollingIfUncanceled,
- double uiCreateTime)
- : UIEventWithKeyState(type, true, cancelable, view, 0,
- ctrlKey, altKey, shiftKey, metaKey)
+ TouchList* changedTouches, const AtomicString& type,
+ PassRefPtrWillBeRawPtr<AbstractView> view,
+ PassRefPtrWillBeRawPtr<InputDevice> sourceDevice,
+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable, bool causesScrollingIfUncanceled,
+ double uiCreateTime)
+ : UIEventWithKeyState(type, true, cancelable, view, 0, sourceDevice, ctrlKey, altKey, shiftKey, metaKey)
tdresser 2015/06/03 17:50:39 Shouldn't this use touchEventInstance?
, m_touches(touches)
, m_targetTouches(targetTouches)
, m_changedTouches(changedTouches)
@@ -85,6 +86,7 @@ void TouchEvent::initTouchEvent(ScriptState* scriptState, TouchList* touches, To
m_altKey = altKey;
m_shiftKey = shiftKey;
m_metaKey = metaKey;
+ sourceDevice()->setFiresTouchEvents(true);
}
const AtomicString& TouchEvent::interfaceName() const

Powered by Google App Engine
This is Rietveld 408576698