| Index: Source/core/events/MouseEvent.cpp
|
| diff --git a/Source/core/events/MouseEvent.cpp b/Source/core/events/MouseEvent.cpp
|
| index 2ecccb43c3dd31e669da96c199b179628a2bab6b..583fea1527c95125d754756ff809e3de6de9f95b 100644
|
| --- a/Source/core/events/MouseEvent.cpp
|
| +++ b/Source/core/events/MouseEvent.cpp
|
| @@ -111,7 +111,7 @@ MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& init
|
| , m_buttonDown(initializer.button() != (unsigned short)-1)
|
| , m_relatedTarget(initializer.relatedTarget())
|
| , m_dataTransfer(nullptr)
|
| - , m_syntheticEventType(PlatformMouseEvent::RealOrIndistinguishable)
|
| + , m_syntheticEventType(PlatformMouseEvent::FromScript)
|
| {
|
| initCoordinates(IntPoint(initializer.clientX(), initializer.clientY()));
|
| }
|
| @@ -156,6 +156,7 @@ void MouseEvent::initMouseEvent(ScriptState* scriptState, const AtomicString& ty
|
| m_buttons = buttons;
|
| m_buttonDown = button != (unsigned short)-1;
|
| m_relatedTarget = relatedTarget;
|
| + m_syntheticEventType = PlatformMouseEvent::FromScript;
|
|
|
| initCoordinates(IntPoint(clientX, clientY));
|
|
|
| @@ -248,13 +249,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)
|
| {
|
| }
|
|
|
| @@ -265,7 +266,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();
|
| }
|
|
|