| 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 bool EventTarget::fireEventListeners(Event* event, EventTargetData* d, EventList
enerVector& entry) | 559 bool EventTarget::fireEventListeners(Event* event, EventTargetData* d, EventList
enerVector& entry) |
| 560 { | 560 { |
| 561 // Fire all listeners registered for this event. Don't fire listeners remove
d | 561 // Fire all listeners registered for this event. Don't fire listeners remove
d |
| 562 // during event dispatch. Also, don't fire event listeners added during even
t | 562 // during event dispatch. Also, don't fire event listeners added during even
t |
| 563 // dispatch. Conveniently, all new event listeners will be added after or at | 563 // dispatch. Conveniently, all new event listeners will be added after or at |
| 564 // index |size|, so iterating up to (but not including) |size| naturally exc
ludes | 564 // index |size|, so iterating up to (but not including) |size| naturally exc
ludes |
| 565 // new event listeners. | 565 // new event listeners. |
| 566 | 566 |
| 567 if (checkTypeThenUseCount(event, EventTypeNames::beforeunload, UseCounter::D
ocumentBeforeUnloadFired)) { | 567 if (checkTypeThenUseCount(event, EventTypeNames::beforeunload, UseCounter::D
ocumentBeforeUnloadFired)) { |
| 568 if (LocalDOMWindow* executingWindow = this->executingWindow()) { | 568 if (LocalDOMWindow* executingWindow = this->executingWindow()) { |
| 569 // TODO(mustaq): Is the |if| condition correct? crbug.com/635029 | 569 if (executingWindow != executingWindow->top()) |
| 570 if (executingWindow->top()) | |
| 571 UseCounter::count(executingWindow->document(), UseCounter::SubFr
ameBeforeUnloadFired); | 570 UseCounter::count(executingWindow->document(), UseCounter::SubFr
ameBeforeUnloadFired); |
| 572 } | 571 } |
| 573 } else if (checkTypeThenUseCount(event, EventTypeNames::unload, UseCounter::
DocumentUnloadFired)) { | 572 } else if (checkTypeThenUseCount(event, EventTypeNames::unload, UseCounter::
DocumentUnloadFired)) { |
| 574 } else if (checkTypeThenUseCount(event, EventTypeNames::DOMFocusIn, UseCount
er::DOMFocusInOutEvent)) { | 573 } else if (checkTypeThenUseCount(event, EventTypeNames::DOMFocusIn, UseCount
er::DOMFocusInOutEvent)) { |
| 575 } else if (checkTypeThenUseCount(event, EventTypeNames::DOMFocusOut, UseCoun
ter::DOMFocusInOutEvent)) { | 574 } else if (checkTypeThenUseCount(event, EventTypeNames::DOMFocusOut, UseCoun
ter::DOMFocusInOutEvent)) { |
| 576 } else if (checkTypeThenUseCount(event, EventTypeNames::focusin, UseCounter:
:FocusInOutEvent)) { | 575 } else if (checkTypeThenUseCount(event, EventTypeNames::focusin, UseCounter:
:FocusInOutEvent)) { |
| 577 } else if (checkTypeThenUseCount(event, EventTypeNames::focusout, UseCounter
::FocusInOutEvent)) { | 576 } else if (checkTypeThenUseCount(event, EventTypeNames::focusout, UseCounter
::FocusInOutEvent)) { |
| 578 } else if (checkTypeThenUseCount(event, EventTypeNames::textInput, UseCounte
r::TextInputFired)) { | 577 } else if (checkTypeThenUseCount(event, EventTypeNames::textInput, UseCounte
r::TextInputFired)) { |
| 579 } else if (checkTypeThenUseCount(event, EventTypeNames::touchstart, UseCount
er::TouchStartFired)) { | 578 } else if (checkTypeThenUseCount(event, EventTypeNames::touchstart, UseCount
er::TouchStartFired)) { |
| 580 } else if (checkTypeThenUseCount(event, EventTypeNames::mousedown, UseCounte
r::MouseDownFired)) { | 579 } else if (checkTypeThenUseCount(event, EventTypeNames::mousedown, UseCounte
r::MouseDownFired)) { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 // they have one less listener to invoke. | 691 // they have one less listener to invoke. |
| 693 if (d->firingEventIterators) { | 692 if (d->firingEventIterators) { |
| 694 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { | 693 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { |
| 695 d->firingEventIterators->at(i).iterator = 0; | 694 d->firingEventIterators->at(i).iterator = 0; |
| 696 d->firingEventIterators->at(i).end = 0; | 695 d->firingEventIterators->at(i).end = 0; |
| 697 } | 696 } |
| 698 } | 697 } |
| 699 } | 698 } |
| 700 | 699 |
| 701 } // namespace blink | 700 } // namespace blink |
| OLD | NEW |