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

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

Issue 1965493002: Add runtime setting to force passive event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 virtual void removedEventListener(const AtomicString& eventType, const Regis teredEventListener&); 162 virtual void removedEventListener(const AtomicString& eventType, const Regis teredEventListener&);
163 163
164 virtual DispatchEventResult dispatchEventInternal(Event*); 164 virtual DispatchEventResult dispatchEventInternal(Event*);
165 165
166 // Subclasses should likely not override these themselves; instead, they sho uld subclass EventTargetWithInlineData. 166 // Subclasses should likely not override these themselves; instead, they sho uld subclass EventTargetWithInlineData.
167 virtual EventTargetData* eventTargetData() = 0; 167 virtual EventTargetData* eventTargetData() = 0;
168 virtual EventTargetData& ensureEventTargetData() = 0; 168 virtual EventTargetData& ensureEventTargetData() = 0;
169 169
170 private: 170 private:
171 LocalDOMWindow* executingWindow(); 171 LocalDOMWindow* executingWindow();
172 void setDefaultAddEventListenerOptions(AddEventListenerOptions&);
172 void fireEventListeners(Event*, EventTargetData*, EventListenerVector&); 173 void fireEventListeners(Event*, EventTargetData*, EventListenerVector&);
173 void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVect or*, EventListenerVector*); 174 void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVect or*, EventListenerVector*);
174 175
175 bool clearAttributeEventListener(const AtomicString& eventType); 176 bool clearAttributeEventListener(const AtomicString& eventType);
176 177
177 friend class EventListenerIterator; 178 friend class EventListenerIterator;
178 }; 179 };
179 180
180 // EventTargetData is a GCed object, so it should not be used as a part of 181 // EventTargetData is a GCed object, so it should not be used as a part of
181 // object. However, we intentionally use it as a part of object for performance, 182 // object. However, we intentionally use it as a part of object for performance,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 { 252 {
252 EventTargetData* d = eventTargetData(); 253 EventTargetData* d = eventTargetData();
253 if (!d) 254 if (!d)
254 return false; 255 return false;
255 return d->eventListenerMap.containsCapturing(eventType); 256 return d->eventListenerMap.containsCapturing(eventType);
256 } 257 }
257 258
258 } // namespace blink 259 } // namespace blink
259 260
260 #endif // EventTarget_h 261 #endif // EventTarget_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698