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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 292 |
293 if (event->type() == EventTypeNames::beforeunload) { | 293 if (event->type() == EventTypeNames::beforeunload) { |
294 if (DOMWindow* executingWindow = this->executingWindow()) { | 294 if (DOMWindow* executingWindow = this->executingWindow()) { |
295 if (executingWindow->top()) | 295 if (executingWindow->top()) |
296 UseCounter::count(executingWindow->document(), UseCounter::SubFr
ameBeforeUnloadFired); | 296 UseCounter::count(executingWindow->document(), UseCounter::SubFr
ameBeforeUnloadFired); |
297 UseCounter::count(executingWindow->document(), UseCounter::DocumentB
eforeUnloadFired); | 297 UseCounter::count(executingWindow->document(), UseCounter::DocumentB
eforeUnloadFired); |
298 } | 298 } |
299 } else if (event->type() == EventTypeNames::unload) { | 299 } else if (event->type() == EventTypeNames::unload) { |
300 if (DOMWindow* executingWindow = this->executingWindow()) | 300 if (DOMWindow* executingWindow = this->executingWindow()) |
301 UseCounter::count(executingWindow->document(), UseCounter::DocumentU
nloadFired); | 301 UseCounter::count(executingWindow->document(), UseCounter::DocumentU
nloadFired); |
| 302 } else if (event->type() == EventTypeNames::DOMFocusIn || event->type() == E
ventTypeNames::DOMFocusOut) { |
| 303 if (DOMWindow* executingWindow = this->executingWindow()) |
| 304 UseCounter::count(executingWindow->document(), UseCounter::DOMFocusI
nOutEvent); |
| 305 } else if (event->type() == EventTypeNames::focusin || event->type() == Even
tTypeNames::focusout) { |
| 306 if (DOMWindow* executingWindow = this->executingWindow()) |
| 307 UseCounter::count(executingWindow->document(), UseCounter::FocusInOu
tEvent); |
302 } | 308 } |
303 | 309 |
304 size_t i = 0; | 310 size_t i = 0; |
305 size_t size = entry.size(); | 311 size_t size = entry.size(); |
306 if (!d->firingEventIterators) | 312 if (!d->firingEventIterators) |
307 d->firingEventIterators = adoptPtr(new FiringEventIteratorVector); | 313 d->firingEventIterators = adoptPtr(new FiringEventIteratorVector); |
308 d->firingEventIterators->append(FiringEventIterator(event->type(), i, size))
; | 314 d->firingEventIterators->append(FiringEventIterator(event->type(), i, size))
; |
309 for ( ; i < size; ++i) { | 315 for ( ; i < size; ++i) { |
310 RegisteredEventListener& registeredListener = entry[i]; | 316 RegisteredEventListener& registeredListener = entry[i]; |
311 if (event->eventPhase() == Event::CAPTURING_PHASE && !registeredListener
.useCapture) | 317 if (event->eventPhase() == Event::CAPTURING_PHASE && !registeredListener
.useCapture) |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // they have one less listener to invoke. | 369 // they have one less listener to invoke. |
364 if (d->firingEventIterators) { | 370 if (d->firingEventIterators) { |
365 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { | 371 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { |
366 d->firingEventIterators->at(i).iterator = 0; | 372 d->firingEventIterators->at(i).iterator = 0; |
367 d->firingEventIterators->at(i).end = 0; | 373 d->firingEventIterators->at(i).end = 0; |
368 } | 374 } |
369 } | 375 } |
370 } | 376 } |
371 | 377 |
372 } // namespace WebCore | 378 } // namespace WebCore |
OLD | NEW |