| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) | 47 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) |
| 48 : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY), | 48 : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY), |
| 49 IntPoint(pageX, pageY), | 49 IntPoint(pageX, pageY), |
| 50 #if ENABLE(POINTER_LOCK) | 50 #if ENABLE(POINTER_LOCK) |
| 51 IntPoint(0, 0), | 51 IntPoint(0, 0), |
| 52 #endif | 52 #endif |
| 53 ctrlKey, altKey, shiftKey, metaKey) | 53 ctrlKey, altKey, shiftKey, metaKey) |
| 54 , m_touches(touches) | 54 , m_touches(touches) |
| 55 , m_targetTouches(targetTouches) | 55 , m_targetTouches(targetTouches) |
| 56 , m_changedTouches(changedTouches) | 56 , m_changedTouches(changedTouches) |
| 57 #if PLATFORM(BLACKBERRY) | |
| 58 , m_touchHold(false) | |
| 59 , m_doubleTap(false) | |
| 60 #endif | |
| 61 { | 57 { |
| 62 } | 58 } |
| 63 | 59 |
| 64 TouchEvent::~TouchEvent() | 60 TouchEvent::~TouchEvent() |
| 65 { | 61 { |
| 66 } | 62 } |
| 67 | 63 |
| 68 void TouchEvent::initTouchEvent(TouchList* touches, TouchList* targetTouches, | 64 void TouchEvent::initTouchEvent(TouchList* touches, TouchList* targetTouches, |
| 69 TouchList* changedTouches, const AtomicString& type, | 65 TouchList* changedTouches, const AtomicString& type, |
| 70 PassRefPtr<AbstractView> view, int screenX, int screenY, int clientX, in
t clientY, | 66 PassRefPtr<AbstractView> view, int screenX, int screenY, int clientX, in
t clientY, |
| 71 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) | 67 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) |
| 72 { | 68 { |
| 73 if (dispatched()) | 69 if (dispatched()) |
| 74 return; | 70 return; |
| 75 | 71 |
| 76 initUIEvent(type, true, true, view, 0); | 72 initUIEvent(type, true, true, view, 0); |
| 77 | 73 |
| 78 m_touches = touches; | 74 m_touches = touches; |
| 79 m_targetTouches = targetTouches; | 75 m_targetTouches = targetTouches; |
| 80 m_changedTouches = changedTouches; | 76 m_changedTouches = changedTouches; |
| 81 m_screenLocation = IntPoint(screenX, screenY); | 77 m_screenLocation = IntPoint(screenX, screenY); |
| 82 m_ctrlKey = ctrlKey; | 78 m_ctrlKey = ctrlKey; |
| 83 m_altKey = altKey; | 79 m_altKey = altKey; |
| 84 m_shiftKey = shiftKey; | 80 m_shiftKey = shiftKey; |
| 85 m_metaKey = metaKey; | 81 m_metaKey = metaKey; |
| 86 initCoordinates(IntPoint(clientX, clientY)); | 82 initCoordinates(IntPoint(clientX, clientY)); |
| 87 #if PLATFORM(BLACKBERRY) | |
| 88 m_doubleTap = false; | |
| 89 m_touchHold = false; | |
| 90 #endif | |
| 91 | |
| 92 } | 83 } |
| 93 | 84 |
| 94 const AtomicString& TouchEvent::interfaceName() const | 85 const AtomicString& TouchEvent::interfaceName() const |
| 95 { | 86 { |
| 96 return eventNames().interfaceForTouchEvent; | 87 return eventNames().interfaceForTouchEvent; |
| 97 } | 88 } |
| 98 | 89 |
| 99 bool TouchEvent::isTouchEvent() const | 90 bool TouchEvent::isTouchEvent() const |
| 100 { | 91 { |
| 101 return true; | 92 return true; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 118 | 109 |
| 119 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons
t | 110 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) cons
t |
| 120 { | 111 { |
| 121 EventRetargeter::adjustForTouchEvent(dispatcher->node(), *event(), dispatche
r->eventPath()); | 112 EventRetargeter::adjustForTouchEvent(dispatcher->node(), *event(), dispatche
r->eventPath()); |
| 122 return dispatcher->dispatch(); | 113 return dispatcher->dispatch(); |
| 123 } | 114 } |
| 124 | 115 |
| 125 } // namespace WebCore | 116 } // namespace WebCore |
| 126 | 117 |
| 127 #endif // ENABLE(TOUCH_EVENTS) | 118 #endif // ENABLE(TOUCH_EVENTS) |
| OLD | NEW |