Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: third_party/WebKit/Source/core/events/TouchEvent.cpp

Issue 1925963002: InitEvent should not do anything if dispatch flag is set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per review comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/TextEvent.cpp ('k') | third_party/WebKit/Source/core/events/UIEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698