| Index: third_party/WebKit/Source/core/events/UIEvent.cpp
|
| diff --git a/third_party/WebKit/Source/core/events/UIEvent.cpp b/third_party/WebKit/Source/core/events/UIEvent.cpp
|
| index 178350dcd0cb6648df2bf8dad392d005c2a83dda..0a76237b6dfdb818eff1543abcd2148a2c214053 100644
|
| --- a/third_party/WebKit/Source/core/events/UIEvent.cpp
|
| +++ b/third_party/WebKit/Source/core/events/UIEvent.cpp
|
| @@ -22,8 +22,6 @@
|
|
|
| #include "core/events/UIEvent.h"
|
|
|
| -#include "core/input/InputDeviceCapabilities.h"
|
| -
|
| namespace blink {
|
|
|
| UIEvent::UIEvent() : m_detail(0), m_sourceCapabilities(nullptr) {}
|
| @@ -35,7 +33,7 @@ UIEvent::UIEvent(const AtomicString& eventType,
|
| TimeTicks platformTimeStamp,
|
| AbstractView* viewArg,
|
| int detailArg,
|
| - InputDeviceCapabilities* sourceCapabilitiesArg)
|
| + const InputDeviceCapabilitiesValue& sourceCapabilitiesArg)
|
| : Event(eventType,
|
| canBubbleArg,
|
| cancelableArg,
|
| @@ -59,7 +57,7 @@ void UIEvent::initUIEvent(const AtomicString& typeArg,
|
| AbstractView* viewArg,
|
| int detailArg) {
|
| initUIEventInternal(typeArg, canBubbleArg, cancelableArg, nullptr, viewArg,
|
| - detailArg, nullptr);
|
| + detailArg, InputDeviceCapabilities::Null);
|
| }
|
|
|
| void UIEvent::initUIEventInternal(
|
| @@ -69,7 +67,7 @@ void UIEvent::initUIEventInternal(
|
| EventTarget* relatedTarget,
|
| AbstractView* viewArg,
|
| int detailArg,
|
| - InputDeviceCapabilities* sourceCapabilitiesArg) {
|
| + const InputDeviceCapabilitiesValue& sourceCapabilitiesArg) {
|
| if (isBeingDispatched())
|
| return;
|
|
|
| @@ -92,6 +90,13 @@ int UIEvent::which() const {
|
| return 0;
|
| }
|
|
|
| +InputDeviceCapabilities* UIEvent::sourceCapabilities() {
|
| + // TODO: align with what the spec decides for the scope of
|
| + // |sourceCapabilities|. i.e., the returned instance may end up as being
|
| + // unique per-UIEvent, not window.
|
| + return m_sourceCapabilities.getCapabilities(m_view);
|
| +}
|
| +
|
| DEFINE_TRACE(UIEvent) {
|
| visitor->trace(m_view);
|
| visitor->trace(m_sourceCapabilities);
|
|
|