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

Side by Side 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: sourceDevice set to null from Javascript 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2008, The Android Open Source Project 2 * Copyright 2008, The Android Open Source Project
3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright 10 * * Redistributions in binary form must reproduce the above copyright
(...skipping 28 matching lines...) Expand all
39 39
40 TouchEvent::TouchEvent() 40 TouchEvent::TouchEvent()
41 { 41 {
42 } 42 }
43 43
44 TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches, 44 TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches,
45 TouchList* changedTouches, const AtomicString& type, 45 TouchList* changedTouches, const AtomicString& type,
46 PassRefPtrWillBeRawPtr<AbstractView> view, 46 PassRefPtrWillBeRawPtr<AbstractView> view,
47 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable, bool causesScrollingIfUncanceled, 47 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable, bool causesScrollingIfUncanceled,
48 double uiCreateTime) 48 double uiCreateTime)
49 : UIEventWithKeyState(type, true, cancelable, view, 0, 49 : UIEventWithKeyState(type, true, cancelable, view, 0, InputDevice::touchEve ntInstance(),
tdresser 2015/06/08 12:36:39 Add a comment on why it's okay to set sourceDevice
50 ctrlKey, altKey, shiftKey, metaKey) 50 ctrlKey, altKey, shiftKey, metaKey)
51 , m_touches(touches) 51 , m_touches(touches)
52 , m_targetTouches(targetTouches) 52 , m_targetTouches(targetTouches)
53 , m_changedTouches(changedTouches) 53 , m_changedTouches(changedTouches)
54 , m_causesScrollingIfUncanceled(causesScrollingIfUncanceled) 54 , m_causesScrollingIfUncanceled(causesScrollingIfUncanceled)
55 { 55 {
56 setUICreateTime(uiCreateTime); 56 setUICreateTime(uiCreateTime);
57 } 57 }
58 58
59 TouchEvent::~TouchEvent() 59 TouchEvent::~TouchEvent()
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return toTouchEvent(EventDispatchMediator::event()); 132 return toTouchEvent(EventDispatchMediator::event());
133 } 133 }
134 134
135 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t 135 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t
136 { 136 {
137 event().eventPath().adjustForTouchEvent(event()); 137 event().eventPath().adjustForTouchEvent(event());
138 return dispatcher.dispatch(); 138 return dispatcher.dispatch();
139 } 139 }
140 140
141 } // namespace blink 141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698