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

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: Fix 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) 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 virtual void removedEventListener(const AtomicString& eventType, const Regis teredEventListener&); 164 virtual void removedEventListener(const AtomicString& eventType, const Regis teredEventListener&);
165 165
166 virtual DispatchEventResult dispatchEventInternal(Event*); 166 virtual DispatchEventResult dispatchEventInternal(Event*);
167 167
168 // Subclasses should likely not override these themselves; instead, they sho uld subclass EventTargetWithInlineData. 168 // Subclasses should likely not override these themselves; instead, they sho uld subclass EventTargetWithInlineData.
169 virtual EventTargetData* eventTargetData() = 0; 169 virtual EventTargetData* eventTargetData() = 0;
170 virtual EventTargetData& ensureEventTargetData() = 0; 170 virtual EventTargetData& ensureEventTargetData() = 0;
171 171
172 private: 172 private:
173 LocalDOMWindow* executingWindow(); 173 LocalDOMWindow* executingWindow();
174 void setDefaultAddEventListenerOptions(AddEventListenerOptions&);
174 void fireEventListeners(Event*, EventTargetData*, EventListenerVector&); 175 void fireEventListeners(Event*, EventTargetData*, EventListenerVector&);
175 void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVect or*, EventListenerVector*); 176 void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVect or*, EventListenerVector*);
176 177
177 bool clearAttributeEventListener(const AtomicString& eventType); 178 bool clearAttributeEventListener(const AtomicString& eventType);
178 179
179 friend class EventListenerIterator; 180 friend class EventListenerIterator;
180 }; 181 };
181 182
182 // EventTargetData is a GCed object, so it should not be used as a part of 183 // EventTargetData is a GCed object, so it should not be used as a part of
183 // object. However, we intentionally use it as a part of object for performance, 184 // 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
253 { 254 {
254 EventTargetData* d = eventTargetData(); 255 EventTargetData* d = eventTargetData();
255 if (!d) 256 if (!d)
256 return false; 257 return false;
257 return d->eventListenerMap.containsCapturing(eventType); 258 return d->eventListenerMap.containsCapturing(eventType);
258 } 259 }
259 260
260 } // namespace blink 261 } // namespace blink
261 262
262 #endif // EventTarget_h 263 #endif // EventTarget_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698