| Index: Source/core/events/PointerEvent.cpp
|
| diff --git a/Source/core/events/PointerEvent.cpp b/Source/core/events/PointerEvent.cpp
|
| index 3cfe5e0c6645a3ab36520117c1dcba83b753d19e..8a95c610b4bfa4368a9f2f70b11475b582d6ee36 100644
|
| --- a/Source/core/events/PointerEvent.cpp
|
| +++ b/Source/core/events/PointerEvent.cpp
|
| @@ -3,8 +3,12 @@
|
| // found in the LICENSE file.
|
|
|
| #include "config.h"
|
| +
|
| #include "core/events/PointerEvent.h"
|
|
|
| +#include "core/dom/Element.h"
|
| +#include "core/events/EventDispatcher.h"
|
| +
|
| namespace blink {
|
|
|
| PointerEvent::PointerEvent()
|
| @@ -46,6 +50,11 @@ PointerEvent::PointerEvent(const AtomicString& type, const PointerEventInit& ini
|
| m_isPrimary = initializer.isPrimary();
|
| }
|
|
|
| +bool PointerEvent::isMouseEvent() const
|
| +{
|
| + return false;
|
| +}
|
| +
|
| bool PointerEvent::isPointerEvent() const
|
| {
|
| return true;
|
| @@ -56,4 +65,36 @@ DEFINE_TRACE(PointerEvent)
|
| MouseEvent::trace(visitor);
|
| }
|
|
|
| +PassRefPtrWillBeRawPtr<PointerEventDispatchMediator> PointerEventDispatchMediator::create(PassRefPtrWillBeRawPtr<PointerEvent> pointerEvent)
|
| +{
|
| + return adoptRefWillBeNoop(new PointerEventDispatchMediator(pointerEvent));
|
| +}
|
| +
|
| +PointerEventDispatchMediator::PointerEventDispatchMediator(PassRefPtrWillBeRawPtr<PointerEvent> pointerEvent)
|
| + : EventDispatchMediator(pointerEvent)
|
| +{
|
| +}
|
| +
|
| +PointerEvent& PointerEventDispatchMediator::event() const
|
| +{
|
| + return toPointerEvent(EventDispatchMediator::event());
|
| +}
|
| +
|
| +bool PointerEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) const
|
| +{
|
| + if (isDisabledFormControl(&dispatcher.node()))
|
| + return false;
|
| +
|
| + if (event().type().isEmpty())
|
| + return true; // Shouldn't happen.
|
| +
|
| + ASSERT(!event().target() || event().target() != event().relatedTarget());
|
| +
|
| + EventTarget* relatedTarget = event().relatedTarget();
|
| + event().eventPath().adjustForRelatedTarget(dispatcher.node(), relatedTarget);
|
| +
|
| + dispatcher.dispatch();
|
| + return !event().defaultHandled() && !event().defaultPrevented();
|
| +}
|
| +
|
| } // namespace blink
|
|
|