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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 } else if (checkTypeThenUseCount(event, EventTypeNames::focusin, UseCounter:
:FocusInOutEvent)) { | 581 } else if (checkTypeThenUseCount(event, EventTypeNames::focusin, UseCounter:
:FocusInOutEvent)) { |
582 } else if (checkTypeThenUseCount(event, EventTypeNames::focusout, UseCounter
::FocusInOutEvent)) { | 582 } else if (checkTypeThenUseCount(event, EventTypeNames::focusout, UseCounter
::FocusInOutEvent)) { |
583 } else if (checkTypeThenUseCount(event, EventTypeNames::textInput, UseCounte
r::TextInputFired)) { | 583 } else if (checkTypeThenUseCount(event, EventTypeNames::textInput, UseCounte
r::TextInputFired)) { |
584 } else if (checkTypeThenUseCount(event, EventTypeNames::touchstart, UseCount
er::TouchStartFired)) { | 584 } else if (checkTypeThenUseCount(event, EventTypeNames::touchstart, UseCount
er::TouchStartFired)) { |
585 } else if (checkTypeThenUseCount(event, EventTypeNames::mousedown, UseCounte
r::MouseDownFired)) { | 585 } else if (checkTypeThenUseCount(event, EventTypeNames::mousedown, UseCounte
r::MouseDownFired)) { |
586 } else if (checkTypeThenUseCount(event, EventTypeNames::pointerdown, UseCoun
ter::PointerDownFired)) { | 586 } else if (checkTypeThenUseCount(event, EventTypeNames::pointerdown, UseCoun
ter::PointerDownFired)) { |
587 if (LocalDOMWindow* executingWindow = this->executingWindow()) { | 587 if (LocalDOMWindow* executingWindow = this->executingWindow()) { |
588 if (event->isPointerEvent() && static_cast<PointerEvent*>(event)->po
interType() == "touch") | 588 if (event->isPointerEvent() && static_cast<PointerEvent*>(event)->po
interType() == "touch") |
589 UseCounter::count(executingWindow->document(), UseCounter::Point
erDownFiredForTouch); | 589 UseCounter::count(executingWindow->document(), UseCounter::Point
erDownFiredForTouch); |
590 } | 590 } |
| 591 } else if (checkTypeThenUseCount(event, EventTypeNames::pointerenter, UseCou
nter::PointerEnterLeaveFired) |
| 592 || checkTypeThenUseCount(event, EventTypeNames::pointerleave, UseCounter
::PointerEnterLeaveFired) |
| 593 || checkTypeThenUseCount(event, EventTypeNames::pointerover, UseCounter:
:PointerOverOutFired) |
| 594 || checkTypeThenUseCount(event, EventTypeNames::pointerout, UseCounter::
PointerOverOutFired)) { |
| 595 LocalDOMWindow* executingWindow = this->executingWindow(); |
| 596 Node* node = toNode(); |
| 597 if (executingWindow && node && node->getNodeType() == Node::kElementNode
&& event->isPointerEvent()) { |
| 598 const Element* element = static_cast<Element*>(node); |
| 599 const PointerEvent* pointerEvent = static_cast<PointerEvent*>(event)
; |
| 600 const UseCounter::Feature feature = (event->type() == EventTypeNames
::pointerenter || event->type() == EventTypeNames::pointerleave) |
| 601 ? UseCounter::PointerEnterLeaveFiredWhileCaptured |
| 602 : UseCounter::PointerOverOutFiredWhileCaptured; |
| 603 if (element->hasProcessedPointerCapture(pointerEvent->pointerId())) |
| 604 UseCounter::count(executingWindow->document(), feature); |
| 605 } |
591 } | 606 } |
592 | 607 |
593 ExecutionContext* context = getExecutionContext(); | 608 ExecutionContext* context = getExecutionContext(); |
594 if (!context) | 609 if (!context) |
595 return false; | 610 return false; |
596 | 611 |
597 size_t i = 0; | 612 size_t i = 0; |
598 size_t size = entry.size(); | 613 size_t size = entry.size(); |
599 if (!d->firingEventIterators) | 614 if (!d->firingEventIterators) |
600 d->firingEventIterators = wrapUnique(new FiringEventIteratorVector); | 615 d->firingEventIterators = wrapUnique(new FiringEventIteratorVector); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 // they have one less listener to invoke. | 712 // they have one less listener to invoke. |
698 if (d->firingEventIterators) { | 713 if (d->firingEventIterators) { |
699 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { | 714 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { |
700 d->firingEventIterators->at(i).iterator = 0; | 715 d->firingEventIterators->at(i).iterator = 0; |
701 d->firingEventIterators->at(i).end = 0; | 716 d->firingEventIterators->at(i).end = 0; |
702 } | 717 } |
703 } | 718 } |
704 } | 719 } |
705 | 720 |
706 } // namespace blink | 721 } // namespace blink |
OLD | NEW |