| OLD | NEW |
| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 PassRefPtrWillBeRawPtr<AbstractView> view, | 46 PassRefPtrWillBeRawPtr<AbstractView> view, |
| 47 PlatformEvent::Modifiers modifiers, bool cancelable, bool causesScrollingIfU
ncanceled, | 47 PlatformEvent::Modifiers modifiers, bool cancelable, bool causesScrollingIfU
ncanceled, |
| 48 double timestamp) | 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, modifiers, InputDevic
eCapabilities::firesTouchEventsSourceCapabilities()), | 50 : UIEventWithKeyState(type, true, cancelable, view, 0, modifiers, InputDevic
eCapabilities::firesTouchEventsSourceCapabilities()), |
| 51 m_touches(touches), m_targetTouches(targetTouches), m_changedTouches(changed
Touches), m_causesScrollingIfUncanceled(causesScrollingIfUncanceled) | 51 m_touches(touches), m_targetTouches(targetTouches), m_changedTouches(changed
Touches), m_causesScrollingIfUncanceled(causesScrollingIfUncanceled) |
| 52 { | 52 { |
| 53 setPlatformTimeStamp(timestamp); | 53 setPlatformTimeStamp(timestamp); |
| 54 } | 54 } |
| 55 | 55 |
| 56 TouchEvent::TouchEvent(const AtomicString& type, const TouchEventInit& initializ
er) |
| 57 : UIEventWithKeyState(type, initializer) |
| 58 , m_touches(TouchList::create(initializer.touches())) |
| 59 , m_targetTouches(TouchList::create(initializer.targetTouches())) |
| 60 , m_changedTouches(TouchList::create(initializer.changedTouches())) |
| 61 { |
| 62 } |
| 63 |
| 56 TouchEvent::~TouchEvent() | 64 TouchEvent::~TouchEvent() |
| 57 { | 65 { |
| 58 } | 66 } |
| 59 | 67 |
| 60 void TouchEvent::initTouchEvent(ScriptState* scriptState, TouchList* touches, To
uchList* targetTouches, | 68 void TouchEvent::initTouchEvent(ScriptState* scriptState, TouchList* touches, To
uchList* targetTouches, |
| 61 TouchList* changedTouches, const AtomicString& type, | 69 TouchList* changedTouches, const AtomicString& type, |
| 62 PassRefPtrWillBeRawPtr<AbstractView> view, | 70 PassRefPtrWillBeRawPtr<AbstractView> view, |
| 63 int, int, int, int, | 71 int, int, int, int, |
| 64 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) | 72 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) |
| 65 { | 73 { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 return toTouchEvent(EventDispatchMediator::event()); | 140 return toTouchEvent(EventDispatchMediator::event()); |
| 133 } | 141 } |
| 134 | 142 |
| 135 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons
t | 143 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons
t |
| 136 { | 144 { |
| 137 event().eventPath().adjustForTouchEvent(event()); | 145 event().eventPath().adjustForTouchEvent(event()); |
| 138 return dispatcher.dispatch(); | 146 return dispatcher.dispatch(); |
| 139 } | 147 } |
| 140 | 148 |
| 141 } // namespace blink | 149 } // namespace blink |
| OLD | NEW |