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

Side by Side Diff: third_party/WebKit/Source/core/events/TouchEvent.cpp

Issue 1352523002: Use high precision timestamp for Event.timestamp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 2 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 27 matching lines...) Expand all
38 namespace blink { 38 namespace blink {
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 timestamp)
49 // Pass a sourceCapabilities including the ability to fire touchevents when creating this touchevent, which is always created from input device capabilities from EventHandler. 49 // Pass a sourceCapabilities including the ability to fire touchevents when creating this touchevent, which is always created from input device capabilities from EventHandler.
50 : UIEventWithKeyState(type, true, cancelable, view, 0, ctrlKey, altKey, shif tKey, metaKey, InputDeviceCapabilities::firesTouchEventsSourceCapabilities()) 50 : UIEventWithKeyState(type, true, cancelable, view, 0, ctrlKey, altKey, shif tKey, metaKey, InputDeviceCapabilities::firesTouchEventsSourceCapabilities())
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 setPlatformTimeStamp(timestamp);
57 } 57 }
58 58
59 TouchEvent::~TouchEvent() 59 TouchEvent::~TouchEvent()
60 { 60 {
61 } 61 }
62 62
63 void TouchEvent::initTouchEvent(ScriptState* scriptState, TouchList* touches, To uchList* targetTouches, 63 void TouchEvent::initTouchEvent(ScriptState* scriptState, TouchList* touches, To uchList* targetTouches,
64 TouchList* changedTouches, const AtomicString& type, 64 TouchList* changedTouches, const AtomicString& type,
65 PassRefPtrWillBeRawPtr<AbstractView> view, 65 PassRefPtrWillBeRawPtr<AbstractView> view,
66 int, int, int, int, 66 int, int, int, int,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return toTouchEvent(EventDispatchMediator::event()); 138 return toTouchEvent(EventDispatchMediator::event());
139 } 139 }
140 140
141 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t 141 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t
142 { 142 {
143 event().eventPath().adjustForTouchEvent(event()); 143 event().eventPath().adjustForTouchEvent(event());
144 return dispatcher.dispatch(); 144 return dispatcher.dispatch();
145 } 145 }
146 146
147 } // namespace blink 147 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/MouseEvent.cpp ('k') | third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698