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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 TouchEvent::~TouchEvent() | 61 TouchEvent::~TouchEvent() |
62 { | 62 { |
63 } | 63 } |
64 | 64 |
65 void TouchEvent::initTouchEvent(ScriptState* scriptState, TouchList* touches, To
uchList* targetTouches, | 65 void TouchEvent::initTouchEvent(ScriptState* scriptState, TouchList* touches, To
uchList* targetTouches, |
66 TouchList* changedTouches, const AtomicString& type, | 66 TouchList* changedTouches, const AtomicString& type, |
67 AbstractView* view, | 67 AbstractView* view, |
68 int, int, int, int, | 68 int, int, int, int, |
69 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) | 69 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) |
70 { | 70 { |
71 if (dispatched()) | 71 if (isBeingDispatched()) |
72 return; | 72 return; |
73 | 73 |
74 if (scriptState->world().isIsolatedWorld()) | 74 if (scriptState->world().isIsolatedWorld()) |
75 UIEventWithKeyState::didCreateEventInIsolatedWorld(ctrlKey, altKey, shif
tKey, metaKey); | 75 UIEventWithKeyState::didCreateEventInIsolatedWorld(ctrlKey, altKey, shif
tKey, metaKey); |
76 | 76 |
77 bool cancelable = true; | 77 bool cancelable = true; |
78 if (type == EventTypeNames::touchcancel) | 78 if (type == EventTypeNames::touchcancel) |
79 cancelable = false; | 79 cancelable = false; |
80 | 80 |
81 initUIEvent(type, true, cancelable, view, 0); | 81 initUIEvent(type, true, cancelable, view, 0); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 return toTouchEvent(EventDispatchMediator::event()); | 137 return toTouchEvent(EventDispatchMediator::event()); |
138 } | 138 } |
139 | 139 |
140 DispatchEventResult TouchEventDispatchMediator::dispatchEvent(EventDispatcher& d
ispatcher) const | 140 DispatchEventResult TouchEventDispatchMediator::dispatchEvent(EventDispatcher& d
ispatcher) const |
141 { | 141 { |
142 event().eventPath().adjustForTouchEvent(event()); | 142 event().eventPath().adjustForTouchEvent(event()); |
143 return dispatcher.dispatch(); | 143 return dispatcher.dispatch(); |
144 } | 144 } |
145 | 145 |
146 } // namespace blink | 146 } // namespace blink |
OLD | NEW |