Index: Source/core/events/MouseEvent.cpp |
diff --git a/Source/core/events/MouseEvent.cpp b/Source/core/events/MouseEvent.cpp |
index 9466eb8a49d9b992a4a9c5307610b4e9b31d9082..1d9aa4ab0440ace1e537af636aabb59b48513a46 100644 |
--- a/Source/core/events/MouseEvent.cpp |
+++ b/Source/core/events/MouseEvent.cpp |
@@ -217,20 +217,20 @@ DEFINE_TRACE(MouseEvent) |
MouseRelatedEvent::trace(visitor); |
} |
-PassRefPtrWillBeRawPtr<SimulatedMouseEvent> SimulatedMouseEvent::create(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView> view, PassRefPtrWillBeRawPtr<Event> underlyingEvent) |
+PassRefPtrWillBeRawPtr<SimulatedMouseEvent> SimulatedMouseEvent::create(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView> view, PassRefPtrWillBeRawPtr<Event> underlyingEvent, SimulatedClickCreationScope creationScope) |
{ |
- return adoptRefWillBeNoop(new SimulatedMouseEvent(eventType, view, underlyingEvent)); |
+ return adoptRefWillBeNoop(new SimulatedMouseEvent(eventType, view, underlyingEvent, creationScope)); |
} |
SimulatedMouseEvent::~SimulatedMouseEvent() |
{ |
} |
-SimulatedMouseEvent::SimulatedMouseEvent(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView> view, PassRefPtrWillBeRawPtr<Event> underlyingEvent) |
+SimulatedMouseEvent::SimulatedMouseEvent(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView> view, PassRefPtrWillBeRawPtr<Event> underlyingEvent, SimulatedClickCreationScope creationScope) |
: MouseEvent(eventType, true, true, view, 0, 0, 0, 0, 0, 0, 0, false, false, false, false, 0, 0, |
nullptr, nullptr, true, PlatformMouseEvent::RealOrIndistinguishable) |
{ |
- setTrusted(true); |
+ setTrusted(creationScope == SimulatedClickCreationScope::FromUserAgent); |
if (UIEventWithKeyState* keyStateEvent = findEventWithKeyState(underlyingEvent.get())) { |
m_ctrlKey = keyStateEvent->ctrlKey(); |
m_altKey = keyStateEvent->altKey(); |