| Index: Source/core/events/MouseEvent.cpp
|
| diff --git a/Source/core/events/MouseEvent.cpp b/Source/core/events/MouseEvent.cpp
|
| index cba1190a3047dba42be57d947a694f65d5184043..6e6eff4a3f927bbc4141f17d6bdcff09a4d094a0 100644
|
| --- a/Source/core/events/MouseEvent.cpp
|
| +++ b/Source/core/events/MouseEvent.cpp
|
| @@ -108,7 +108,7 @@ MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& init
|
| , m_buttons(initializer.buttons())
|
| , m_relatedTarget(initializer.relatedTarget())
|
| , m_dataTransfer(nullptr)
|
| - , m_syntheticEventType(PlatformMouseEvent::RealOrIndistinguishable)
|
| + , m_syntheticEventType(PlatformMouseEvent::FromScript)
|
| {
|
| initCoordinates(IntPoint(initializer.clientX(), initializer.clientY()));
|
| }
|
| @@ -152,6 +152,7 @@ void MouseEvent::initMouseEvent(ScriptState* scriptState, const AtomicString& ty
|
| m_button = button;
|
| m_buttons = buttons;
|
| m_relatedTarget = relatedTarget;
|
| + m_syntheticEventType = PlatformMouseEvent::FromScript;
|
|
|
| initCoordinates(IntPoint(clientX, clientY));
|
|
|
| @@ -242,13 +243,13 @@ DEFINE_TRACE(SimulatedMouseEvent)
|
| MouseEvent::trace(visitor);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<MouseEventDispatchMediator> MouseEventDispatchMediator::create(PassRefPtrWillBeRawPtr<MouseEvent> mouseEvent, MouseEventType mouseEventType)
|
| +PassRefPtrWillBeRawPtr<MouseEventDispatchMediator> MouseEventDispatchMediator::create(PassRefPtrWillBeRawPtr<MouseEvent> mouseEvent)
|
| {
|
| - return adoptRefWillBeNoop(new MouseEventDispatchMediator(mouseEvent, mouseEventType));
|
| + return adoptRefWillBeNoop(new MouseEventDispatchMediator(mouseEvent));
|
| }
|
|
|
| -MouseEventDispatchMediator::MouseEventDispatchMediator(PassRefPtrWillBeRawPtr<MouseEvent> mouseEvent, MouseEventType mouseEventType)
|
| - : EventDispatchMediator(mouseEvent), m_mouseEventType(mouseEventType)
|
| +MouseEventDispatchMediator::MouseEventDispatchMediator(PassRefPtrWillBeRawPtr<MouseEvent> mouseEvent)
|
| + : EventDispatchMediator(mouseEvent)
|
| {
|
| }
|
|
|
| @@ -259,7 +260,7 @@ MouseEvent& MouseEventDispatchMediator::event() const
|
|
|
| bool MouseEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) const
|
| {
|
| - if (isSyntheticMouseEvent()) {
|
| + if (event().fromScript()) {
|
| event().eventPath().adjustForRelatedTarget(dispatcher.node(), event().relatedTarget());
|
| return dispatcher.dispatch();
|
| }
|
|
|