Index: third_party/WebKit/Source/core/events/EventTarget.cpp |
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp |
index d98bb138c288ff47c9a2f04c3a6e7e6343915351..f0b0ba6c45d2c8dc7ecefdf6968059b219182d1e 100644 |
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp |
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp |
@@ -588,6 +588,26 @@ bool EventTarget::fireEventListeners(Event* event, EventTargetData* d, EventList |
if (event->isPointerEvent() && static_cast<PointerEvent*>(event)->pointerType() == "touch") |
UseCounter::count(executingWindow->document(), UseCounter::PointerDownFiredForTouch); |
} |
+ } else if (checkTypeThenUseCount(event, EventTypeNames::pointerenter, UseCounter::PointerEnterLeaveFired) |
+ || checkTypeThenUseCount(event, EventTypeNames::pointerleave, UseCounter::PointerEnterLeaveFired)) { |
+ LocalDOMWindow* executingWindow = this->executingWindow(); |
+ Node* node = toNode(); |
+ if (executingWindow && node && node->getNodeType() == Node::kElementNode && event->isPointerEvent()) { |
+ const Element* element = static_cast<Element*>(node); |
+ const PointerEvent* pointerEvent = static_cast<PointerEvent*>(event); |
+ if (element->hasPointerCapture(pointerEvent->pointerId())) |
+ UseCounter::count(executingWindow->document(), UseCounter::PointerEnterLeaveFiredWhileCaptured); |
+ } |
+ } else if (checkTypeThenUseCount(event, EventTypeNames::pointerover, UseCounter::PointerOverOutFired) |
dtapuska
2016/08/24 20:20:57
This is duplicated code; can we parameterize this
mustaq
2016/08/24 20:50:28
Done.
|
+ || checkTypeThenUseCount(event, EventTypeNames::pointerout, UseCounter::PointerOverOutFired)) { |
+ LocalDOMWindow* executingWindow = this->executingWindow(); |
+ Node* node = toNode(); |
+ if (executingWindow && node && node->getNodeType() == Node::kElementNode && event->isPointerEvent()) { |
+ const Element* element = static_cast<Element*>(node); |
+ const PointerEvent* pointerEvent = static_cast<PointerEvent*>(event); |
+ if (element->hasPointerCapture(pointerEvent->pointerId())) |
+ UseCounter::count(executingWindow->document(), UseCounter::PointerOverOutFiredWhileCaptured); |
+ } |
} |
ExecutionContext* context = getExecutionContext(); |