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

Side by Side Diff: third_party/WebKit/Source/core/events/EventTarget.cpp

Issue 2372293002: Removed navigator.pointerEnabled API. (Closed)
Patch Set: Reverted the xml changes. Created 4 years, 2 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 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } else if (checkTypeThenUseCount(event, EventTypeNames::focusin, UseCounter: :FocusInOutEvent)) { 590 } else if (checkTypeThenUseCount(event, EventTypeNames::focusin, UseCounter: :FocusInOutEvent)) {
591 } else if (checkTypeThenUseCount(event, EventTypeNames::focusout, UseCounter ::FocusInOutEvent)) { 591 } else if (checkTypeThenUseCount(event, EventTypeNames::focusout, UseCounter ::FocusInOutEvent)) {
592 } else if (checkTypeThenUseCount(event, EventTypeNames::textInput, UseCounte r::TextInputFired)) { 592 } else if (checkTypeThenUseCount(event, EventTypeNames::textInput, UseCounte r::TextInputFired)) {
593 } else if (checkTypeThenUseCount(event, EventTypeNames::touchstart, UseCount er::TouchStartFired)) { 593 } else if (checkTypeThenUseCount(event, EventTypeNames::touchstart, UseCount er::TouchStartFired)) {
594 } else if (checkTypeThenUseCount(event, EventTypeNames::mousedown, UseCounte r::MouseDownFired)) { 594 } else if (checkTypeThenUseCount(event, EventTypeNames::mousedown, UseCounte r::MouseDownFired)) {
595 } else if (checkTypeThenUseCount(event, EventTypeNames::pointerdown, UseCoun ter::PointerDownFired)) { 595 } else if (checkTypeThenUseCount(event, EventTypeNames::pointerdown, UseCoun ter::PointerDownFired)) {
596 if (LocalDOMWindow* executingWindow = this->executingWindow()) { 596 if (LocalDOMWindow* executingWindow = this->executingWindow()) {
597 if (event->isPointerEvent() && static_cast<PointerEvent*>(event)->po interType() == "touch") 597 if (event->isPointerEvent() && static_cast<PointerEvent*>(event)->po interType() == "touch")
598 UseCounter::count(executingWindow->document(), UseCounter::Point erDownFiredForTouch); 598 UseCounter::count(executingWindow->document(), UseCounter::Point erDownFiredForTouch);
599 } 599 }
600 } else if (checkTypeThenUseCount(event, EventTypeNames::pointerenter, UseCou nter::PointerEnterLeaveFired) 600 } else if (checkTypeThenUseCount(event, EventTypeNames::pointerenter, UseCou nter::PointerEnterLeaveFired)) {
601 || checkTypeThenUseCount(event, EventTypeNames::pointerleave, UseCounter ::PointerEnterLeaveFired) 601 } else if (checkTypeThenUseCount(event, EventTypeNames::pointerleave, UseCou nter::PointerEnterLeaveFired)) {
602 || checkTypeThenUseCount(event, EventTypeNames::pointerover, UseCounter: :PointerOverOutFired) 602 } else if (checkTypeThenUseCount(event, EventTypeNames::pointerover, UseCoun ter::PointerOverOutFired)) {
603 || checkTypeThenUseCount(event, EventTypeNames::pointerout, UseCounter:: PointerOverOutFired)) { 603 } else if (checkTypeThenUseCount(event, EventTypeNames::pointerout, UseCount er::PointerOverOutFired)) {
604 LocalDOMWindow* executingWindow = this->executingWindow();
605 Node* node = toNode();
606 if (executingWindow && node && node->getNodeType() == Node::kElementNode && event->isPointerEvent()) {
607 const Element* element = static_cast<Element*>(node);
608 const PointerEvent* pointerEvent = static_cast<PointerEvent*>(event) ;
609 const UseCounter::Feature feature = (event->type() == EventTypeNames ::pointerenter || event->type() == EventTypeNames::pointerleave)
610 ? UseCounter::PointerEnterLeaveFiredWhileCaptured
611 : UseCounter::PointerOverOutFiredWhileCaptured;
612 if (element->hasPointerCapture(pointerEvent->pointerId()) && element ->hasProcessedPointerCapture(pointerEvent->pointerId()))
613 UseCounter::count(executingWindow->document(), feature);
614 }
615 } 604 }
616 605
617 ExecutionContext* context = getExecutionContext(); 606 ExecutionContext* context = getExecutionContext();
618 if (!context) 607 if (!context)
619 return false; 608 return false;
620 609
621 size_t i = 0; 610 size_t i = 0;
622 size_t size = entry.size(); 611 size_t size = entry.size();
623 if (!d->firingEventIterators) 612 if (!d->firingEventIterators)
624 d->firingEventIterators = wrapUnique(new FiringEventIteratorVector); 613 d->firingEventIterators = wrapUnique(new FiringEventIteratorVector);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 // they have one less listener to invoke. 715 // they have one less listener to invoke.
727 if (d->firingEventIterators) { 716 if (d->firingEventIterators) {
728 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) { 717 for (size_t i = 0; i < d->firingEventIterators->size(); ++i) {
729 d->firingEventIterators->at(i).iterator = 0; 718 d->firingEventIterators->at(i).iterator = 0;
730 d->firingEventIterators->at(i).end = 0; 719 d->firingEventIterators->at(i).end = 0;
731 } 720 }
732 } 721 }
733 } 722 }
734 723
735 } // namespace blink 724 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698