| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 , m_causesScrollingIfUncanceled(false) | 180 , m_causesScrollingIfUncanceled(false) |
| 181 , m_firstTouchMoveOrStart(false) | 181 , m_firstTouchMoveOrStart(false) |
| 182 , m_defaultPreventedBeforeCurrentTarget(false) | 182 , m_defaultPreventedBeforeCurrentTarget(false) |
| 183 { | 183 { |
| 184 } | 184 } |
| 185 | 185 |
| 186 TouchEvent::~TouchEvent() | 186 TouchEvent::~TouchEvent() |
| 187 { | 187 { |
| 188 } | 188 } |
| 189 | 189 |
| 190 void TouchEvent::initTouchEvent(ScriptState* scriptState, TouchList* touches, To
uchList* targetTouches, | |
| 191 TouchList* changedTouches, const AtomicString& type, | |
| 192 AbstractView* view, | |
| 193 int, int, int, int, | |
| 194 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) | |
| 195 { | |
| 196 if (isBeingDispatched()) | |
| 197 return; | |
| 198 | |
| 199 if (scriptState->world().isIsolatedWorld()) | |
| 200 UIEventWithKeyState::didCreateEventInIsolatedWorld(ctrlKey, altKey, shif
tKey, metaKey); | |
| 201 | |
| 202 bool cancelable = true; | |
| 203 if (type == EventTypeNames::touchcancel) | |
| 204 cancelable = false; | |
| 205 | |
| 206 initUIEvent(type, true, cancelable, view, 0); | |
| 207 | |
| 208 m_touches = touches; | |
| 209 m_targetTouches = targetTouches; | |
| 210 m_changedTouches = changedTouches; | |
| 211 initModifiers(ctrlKey, altKey, shiftKey, metaKey); | |
| 212 } | |
| 213 | |
| 214 const AtomicString& TouchEvent::interfaceName() const | 190 const AtomicString& TouchEvent::interfaceName() const |
| 215 { | 191 { |
| 216 return EventNames::TouchEvent; | 192 return EventNames::TouchEvent; |
| 217 } | 193 } |
| 218 | 194 |
| 219 bool TouchEvent::isTouchEvent() const | 195 bool TouchEvent::isTouchEvent() const |
| 220 { | 196 { |
| 221 return true; | 197 return true; |
| 222 } | 198 } |
| 223 | 199 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 return toTouchEvent(EventDispatchMediator::event()); | 250 return toTouchEvent(EventDispatchMediator::event()); |
| 275 } | 251 } |
| 276 | 252 |
| 277 DispatchEventResult TouchEventDispatchMediator::dispatchEvent(EventDispatcher& d
ispatcher) const | 253 DispatchEventResult TouchEventDispatchMediator::dispatchEvent(EventDispatcher& d
ispatcher) const |
| 278 { | 254 { |
| 279 event().eventPath().adjustForTouchEvent(event()); | 255 event().eventPath().adjustForTouchEvent(event()); |
| 280 return dispatcher.dispatch(); | 256 return dispatcher.dispatch(); |
| 281 } | 257 } |
| 282 | 258 |
| 283 } // namespace blink | 259 } // namespace blink |
| OLD | NEW |