| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 namespace WebCore { | 34 namespace WebCore { |
| 35 | 35 |
| 36 TouchEvent::TouchEvent() | 36 TouchEvent::TouchEvent() |
| 37 { | 37 { |
| 38 ScriptWrappable::init(this); | 38 ScriptWrappable::init(this); |
| 39 } | 39 } |
| 40 | 40 |
| 41 TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches, | 41 TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches, |
| 42 TouchList* changedTouches, const AtomicString& type, | 42 TouchList* changedTouches, const AtomicString& type, |
| 43 PassRefPtr<AbstractView> view, int screenX, int screenY, int pageX, int
pageY, | 43 PassRefPtrWillBeRawPtr<AbstractView> view, int screenX, int screenY, int
pageX, int pageY, |
| 44 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) | 44 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) |
| 45 : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY), | 45 : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY), |
| 46 IntPoint(pageX, pageY), | 46 IntPoint(pageX, pageY), |
| 47 IntPoint(0, 0), | 47 IntPoint(0, 0), |
| 48 ctrlKey, altKey, shiftKey, metaKey) | 48 ctrlKey, altKey, shiftKey, metaKey) |
| 49 , m_touches(touches) | 49 , m_touches(touches) |
| 50 , m_targetTouches(targetTouches) | 50 , m_targetTouches(targetTouches) |
| 51 , m_changedTouches(changedTouches) | 51 , m_changedTouches(changedTouches) |
| 52 { | 52 { |
| 53 ScriptWrappable::init(this); | 53 ScriptWrappable::init(this); |
| 54 } | 54 } |
| 55 | 55 |
| 56 TouchEvent::~TouchEvent() | 56 TouchEvent::~TouchEvent() |
| 57 { | 57 { |
| 58 } | 58 } |
| 59 | 59 |
| 60 void TouchEvent::initTouchEvent(TouchList* touches, TouchList* targetTouches, | 60 void TouchEvent::initTouchEvent(TouchList* touches, TouchList* targetTouches, |
| 61 TouchList* changedTouches, const AtomicString& type, | 61 TouchList* changedTouches, const AtomicString& type, |
| 62 PassRefPtr<AbstractView> view, int screenX, int screenY, int clientX, in
t clientY, | 62 PassRefPtrWillBeRawPtr<AbstractView> view, int screenX, int screenY, int
clientX, int clientY, |
| 63 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) | 63 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) |
| 64 { | 64 { |
| 65 if (dispatched()) | 65 if (dispatched()) |
| 66 return; | 66 return; |
| 67 | 67 |
| 68 initUIEvent(type, true, true, view, 0); | 68 initUIEvent(type, true, true, view, 0); |
| 69 | 69 |
| 70 m_touches = touches; | 70 m_touches = touches; |
| 71 m_targetTouches = targetTouches; | 71 m_targetTouches = targetTouches; |
| 72 m_changedTouches = changedTouches; | 72 m_changedTouches = changedTouches; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 return toTouchEvent(EventDispatchMediator::event()); | 108 return toTouchEvent(EventDispatchMediator::event()); |
| 109 } | 109 } |
| 110 | 110 |
| 111 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons
t | 111 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons
t |
| 112 { | 112 { |
| 113 event()->eventPath().adjustForTouchEvent(dispatcher->node(), *event()); | 113 event()->eventPath().adjustForTouchEvent(dispatcher->node(), *event()); |
| 114 return dispatcher->dispatch(); | 114 return dispatcher->dispatch(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace WebCore | 117 } // namespace WebCore |
| OLD | NEW |