Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: third_party/WebKit/Source/core/events/MouseEvent.cpp

Issue 1654653002: Canvas2d: Implement rerouting event by hit region's control. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bot errors Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/MouseEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/MouseEvent.cpp b/third_party/WebKit/Source/core/events/MouseEvent.cpp
index 7e969dc8ef1d318b06d6a0f518214991f56c701d..efc23493c562e5074503966c8bdcd1581112ed00 100644
--- a/third_party/WebKit/Source/core/events/MouseEvent.cpp
+++ b/third_party/WebKit/Source/core/events/MouseEvent.cpp
@@ -51,7 +51,7 @@ PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& eventT
event.movementDelta().x(), event.movementDelta().y(),
event.getModifiers(), event.button(),
platformModifiersToButtons(event.getModifiers()),
- relatedTarget, event.timestamp(), event.getSyntheticEventType());
+ relatedTarget, event.timestamp(), event.getSyntheticEventType(), event.region());
}
PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView> view,
@@ -61,12 +61,13 @@ PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& type,
short button, unsigned short buttons,
PassRefPtrWillBeRawPtr<EventTarget> relatedTarget,
double platformTimeStamp,
- PlatformMouseEvent::SyntheticEventType syntheticEventType)
+ PlatformMouseEvent::SyntheticEventType syntheticEventType,
+ const String& region)
{
return adoptRefWillBeNoop(new MouseEvent(type, canBubble, cancelable, view,
detail, screenX, screenY, windowX, windowY,
movementX, movementY,
- modifiers, button, buttons, relatedTarget, platformTimeStamp, syntheticEventType));
+ modifiers, button, buttons, relatedTarget, platformTimeStamp, syntheticEventType, region));
}
PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView> view, PassRefPtrWillBeRawPtr<Event> underlyingEvent, SimulatedClickCreationScope creationScope)
@@ -89,7 +90,7 @@ PassRefPtrWillBeRawPtr<MouseEvent> MouseEvent::create(const AtomicString& eventT
double timestamp = underlyingEvent ? underlyingEvent->platformTimeStamp() : monotonicallyIncreasingTime();
RefPtrWillBeRawPtr<MouseEvent> createdEvent = MouseEvent::create(eventType, true, true, view,
0, screenX, screenY, 0, 0, 0, 0, modifiers, 0, 0, nullptr,
- timestamp, syntheticType);
+ timestamp, syntheticType, String());
createdEvent->setTrusted(creationScope == SimulatedClickCreationScope::FromUserAgent);
createdEvent->setUnderlyingEvent(underlyingEvent);
@@ -116,7 +117,8 @@ MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cance
short button, unsigned short buttons,
PassRefPtrWillBeRawPtr<EventTarget> relatedTarget,
double platformTimeStamp,
- PlatformMouseEvent::SyntheticEventType syntheticEventType)
+ PlatformMouseEvent::SyntheticEventType syntheticEventType,
+ const String& region)
: MouseRelatedEvent(eventType, canBubble, cancelable, view, detail, IntPoint(screenX, screenY),
IntPoint(windowX, windowY), IntPoint(movementX, movementY), modifiers,
platformTimeStamp,
@@ -126,6 +128,7 @@ MouseEvent::MouseEvent(const AtomicString& eventType, bool canBubble, bool cance
, m_buttons(buttons)
, m_relatedTarget(relatedTarget)
, m_syntheticEventType(syntheticEventType)
+ , m_region(region)
{
}
@@ -135,6 +138,7 @@ MouseEvent::MouseEvent(const AtomicString& eventType, const MouseEventInit& init
, m_buttons(initializer.buttons())
, m_relatedTarget(initializer.relatedTarget())
, m_syntheticEventType(PlatformMouseEvent::RealOrIndistinguishable)
+ , m_region(initializer.region())
{
}

Powered by Google App Engine
This is Rietveld 408576698