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

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

Issue 2491233002: Make UA DOMActivate events composed events (Closed)
Patch Set: wip Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // ErrorEvent behaves, can override this method. 226 // ErrorEvent behaves, can override this method.
227 virtual bool canBeDispatchedInWorld(const DOMWrapperWorld&) const { 227 virtual bool canBeDispatchedInWorld(const DOMWrapperWorld&) const {
228 return true; 228 return true;
229 } 229 }
230 230
231 virtual EventDispatchMediator* createMediator(); 231 virtual EventDispatchMediator* createMediator();
232 232
233 bool isTrusted() const { return m_isTrusted; } 233 bool isTrusted() const { return m_isTrusted; }
234 void setTrusted(bool value) { m_isTrusted = value; } 234 void setTrusted(bool value) { m_isTrusted = value; }
235 235
236 void setComposed(bool composed) {
237 DCHECK(!isBeingDispatched());
238 m_composed = composed;
239 }
240
236 void setHandlingPassive(PassiveMode); 241 void setHandlingPassive(PassiveMode);
237 242
238 bool preventDefaultCalledDuringPassive() const { 243 bool preventDefaultCalledDuringPassive() const {
239 return m_preventDefaultCalledDuringPassive; 244 return m_preventDefaultCalledDuringPassive;
240 } 245 }
241 246
242 bool preventDefaultCalledOnUncancelableEvent() const { 247 bool preventDefaultCalledOnUncancelableEvent() const {
243 return m_preventDefaultCalledOnUncancelableEvent; 248 return m_preventDefaultCalledOnUncancelableEvent;
244 } 249 }
245 250
(...skipping 12 matching lines...) Expand all
258 double platformTimeStamp); 263 double platformTimeStamp);
259 Event(const AtomicString& type, 264 Event(const AtomicString& type,
260 bool canBubble, 265 bool canBubble,
261 bool cancelable, 266 bool cancelable,
262 ComposedMode = ComposedMode::Scoped); 267 ComposedMode = ComposedMode::Scoped);
263 Event(const AtomicString& type, const EventInit&); 268 Event(const AtomicString& type, const EventInit&);
264 269
265 virtual void receivedTarget(); 270 virtual void receivedTarget();
266 271
267 void setCanBubble(bool bubble) { m_canBubble = bubble; } 272 void setCanBubble(bool bubble) { m_canBubble = bubble; }
268 void setComposed(bool composed) {
269 DCHECK(!isBeingDispatched());
270 m_composed = composed;
271 }
272 273
273 PassiveMode handlingPassive() const { return m_handlingPassive; } 274 PassiveMode handlingPassive() const { return m_handlingPassive; }
274 275
275 private: 276 private:
276 enum EventPathMode { EmptyAfterDispatch, NonEmptyAfterDispatch }; 277 enum EventPathMode { EmptyAfterDispatch, NonEmptyAfterDispatch };
277 278
278 HeapVector<Member<EventTarget>> pathInternal(ScriptState*, 279 HeapVector<Member<EventTarget>> pathInternal(ScriptState*,
279 EventPathMode) const; 280 EventPathMode) const;
280 281
281 AtomicString m_type; 282 AtomicString m_type;
(...skipping 28 matching lines...) Expand all
310 double m_platformTimeStamp; 311 double m_platformTimeStamp;
311 }; 312 };
312 313
313 #define DEFINE_EVENT_TYPE_CASTS(typeName) \ 314 #define DEFINE_EVENT_TYPE_CASTS(typeName) \
314 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), \ 315 DEFINE_TYPE_CASTS(typeName, Event, event, event->is##typeName(), \
315 event.is##typeName()) 316 event.is##typeName())
316 317
317 } // namespace blink 318 } // namespace blink
318 319
319 #endif // Event_h 320 #endif // Event_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698