OLD | NEW |
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 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 186 } |
187 | 187 |
188 void EventTarget::setDefaultAddEventListenerOptions(const AtomicString& eventTyp
e, AddEventListenerOptions& options) | 188 void EventTarget::setDefaultAddEventListenerOptions(const AtomicString& eventTyp
e, AddEventListenerOptions& options) |
189 { | 189 { |
190 if (!isScrollBlockingEvent(eventType)) { | 190 if (!isScrollBlockingEvent(eventType)) { |
191 if (!options.hasPassive()) | 191 if (!options.hasPassive()) |
192 options.setPassive(false); | 192 options.setPassive(false); |
193 return; | 193 return; |
194 } | 194 } |
195 | 195 |
| 196 if (LocalDOMWindow* executingWindow = this->executingWindow()) { |
| 197 if (options.hasPassive()) { |
| 198 UseCounter::count(executingWindow->document(), options.passive() ? U
seCounter::AddEventListenerPassiveTrue : UseCounter::AddEventListenerPassiveFals
e); |
| 199 } |
| 200 } |
| 201 |
196 if (Settings* settings = windowSettings(executingWindow())) { | 202 if (Settings* settings = windowSettings(executingWindow())) { |
197 switch (settings->passiveListenerDefault()) { | 203 switch (settings->passiveListenerDefault()) { |
198 case PassiveListenerDefault::False: | 204 case PassiveListenerDefault::False: |
199 if (!options.hasPassive()) | 205 if (!options.hasPassive()) |
200 options.setPassive(false); | 206 options.setPassive(false); |
201 break; | 207 break; |
202 case PassiveListenerDefault::True: | 208 case PassiveListenerDefault::True: |
203 if (!options.hasPassive()) | 209 if (!options.hasPassive()) |
204 options.setPassive(true); | 210 options.setPassive(true); |
205 break; | 211 break; |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 // they have one less listener to invoke. | 648 // they have one less listener to invoke. |
643 if (d->firingEventIterators) { | 649 if (d->firingEventIterators) { |
644 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { | 650 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { |
645 d->firingEventIterators->at(i).iterator = 0; | 651 d->firingEventIterators->at(i).iterator = 0; |
646 d->firingEventIterators->at(i).end = 0; | 652 d->firingEventIterators->at(i).end = 0; |
647 } | 653 } |
648 } | 654 } |
649 } | 655 } |
650 | 656 |
651 } // namespace blink | 657 } // namespace blink |
OLD | NEW |