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

Side by Side Diff: third_party/WebKit/Source/core/events/Event.h

Issue 2641953006: Remove setting cancelBubble to false. (Closed)
Patch Set: update Created 3 years, 11 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 (C) 2001 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 bool defaultPrevented() const { return m_defaultPrevented; } 192 bool defaultPrevented() const { return m_defaultPrevented; }
193 virtual void preventDefault(); 193 virtual void preventDefault();
194 void setDefaultPrevented(bool defaultPrevented) { 194 void setDefaultPrevented(bool defaultPrevented) {
195 m_defaultPrevented = defaultPrevented; 195 m_defaultPrevented = defaultPrevented;
196 } 196 }
197 197
198 bool defaultHandled() const { return m_defaultHandled; } 198 bool defaultHandled() const { return m_defaultHandled; }
199 void setDefaultHandled() { m_defaultHandled = true; } 199 void setDefaultHandled() { m_defaultHandled = true; }
200 200
201 bool cancelBubble(ExecutionContext* = nullptr) const { 201 bool cancelBubble(ExecutionContext* = nullptr) const {
202 return m_cancelBubble; 202 return propagationStopped();
203 } 203 }
204 void setCancelBubble(ExecutionContext*, bool); 204 void setCancelBubble(ExecutionContext*, bool);
205 205
206 Event* underlyingEvent() const { return m_underlyingEvent.get(); } 206 Event* underlyingEvent() const { return m_underlyingEvent.get(); }
207 void setUnderlyingEvent(Event*); 207 void setUnderlyingEvent(Event*);
208 208
209 bool hasEventPath() { return m_eventPath; } 209 bool hasEventPath() { return m_eventPath; }
210 EventPath& eventPath() { 210 EventPath& eventPath() {
211 DCHECK(m_eventPath); 211 DCHECK(m_eventPath);
212 return *m_eventPath; 212 return *m_eventPath;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 AtomicString m_type; 278 AtomicString m_type;
279 unsigned m_canBubble : 1; 279 unsigned m_canBubble : 1;
280 unsigned m_cancelable : 1; 280 unsigned m_cancelable : 1;
281 unsigned m_composed : 1; 281 unsigned m_composed : 1;
282 unsigned m_isEventTypeScopedInV0 : 1; 282 unsigned m_isEventTypeScopedInV0 : 1;
283 283
284 unsigned m_propagationStopped : 1; 284 unsigned m_propagationStopped : 1;
285 unsigned m_immediatePropagationStopped : 1; 285 unsigned m_immediatePropagationStopped : 1;
286 unsigned m_defaultPrevented : 1; 286 unsigned m_defaultPrevented : 1;
287 unsigned m_defaultHandled : 1; 287 unsigned m_defaultHandled : 1;
288 unsigned m_cancelBubble : 1;
289 unsigned m_wasInitialized : 1; 288 unsigned m_wasInitialized : 1;
290 unsigned m_isTrusted : 1; 289 unsigned m_isTrusted : 1;
291 290
292 // Whether preventDefault was called when |m_handlingPassive| is 291 // Whether preventDefault was called when |m_handlingPassive| is
293 // true. This field is reset on each call to setHandlingPassive. 292 // true. This field is reset on each call to setHandlingPassive.
294 unsigned m_preventDefaultCalledDuringPassive : 1; 293 unsigned m_preventDefaultCalledDuringPassive : 1;
295 // Whether preventDefault was called on uncancelable event. 294 // Whether preventDefault was called on uncancelable event.
296 unsigned m_preventDefaultCalledOnUncancelableEvent : 1; 295 unsigned m_preventDefaultCalledOnUncancelableEvent : 1;
297 296
298 PassiveMode m_handlingPassive; 297 PassiveMode m_handlingPassive;
299 unsigned short m_eventPhase; 298 unsigned short m_eventPhase;
300 Member<EventTarget> m_currentTarget; 299 Member<EventTarget> m_currentTarget;
301 Member<EventTarget> m_target; 300 Member<EventTarget> m_target;
302 Member<Event> m_underlyingEvent; 301 Member<Event> m_underlyingEvent;
303 Member<EventPath> m_eventPath; 302 Member<EventPath> m_eventPath;
304 // The monotonic platform time in seconds, for input events it is the 303 // The monotonic platform time in seconds, for input events it is the
305 // event timestamp provided by the host OS and reported in the original 304 // event timestamp provided by the host OS and reported in the original
306 // WebInputEvent instance. 305 // WebInputEvent instance.
307 TimeTicks m_platformTimeStamp; 306 TimeTicks m_platformTimeStamp;
308 }; 307 };
309 308
310 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ 309 #define DEFINE_EVENT_TYPE_CASTS(typeName) \
311 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), \ 310 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), \
312 event.is##typeName()) 311 event.is##typeName())
313 312
314 } // namespace blink 313 } // namespace blink
315 314
316 #endif // Event_h 315 #endif // Event_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698