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

Side by Side Diff: third_party/WebKit/Source/core/events/CustomEvent.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 (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 { 43 {
44 } 44 }
45 45
46 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue&) 46 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue&)
47 { 47 {
48 initEvent(type, canBubble, cancelable); 48 initEvent(type, canBubble, cancelable);
49 } 49 }
50 50
51 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> serializedDetail) 51 void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> serializedDetail)
52 { 52 {
53 if (dispatched()) 53 if (isBeingDispatched())
54 return; 54 return;
55 55
56 initEvent(type, canBubble, cancelable); 56 initEvent(type, canBubble, cancelable);
57 57
58 m_serializedDetail = serializedDetail; 58 m_serializedDetail = serializedDetail;
59 } 59 }
60 60
61 const AtomicString& CustomEvent::interfaceName() const 61 const AtomicString& CustomEvent::interfaceName() const
62 { 62 {
63 return EventNames::CustomEvent; 63 return EventNames::CustomEvent;
64 } 64 }
65 65
66 DEFINE_TRACE(CustomEvent) 66 DEFINE_TRACE(CustomEvent)
67 { 67 {
68 Event::trace(visitor); 68 Event::trace(visitor);
69 } 69 }
70 70
71 } // namespace blink 71 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/CompositionEvent.cpp ('k') | third_party/WebKit/Source/core/events/Event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698