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

Unified Diff: third_party/WebKit/Source/core/dom/Touch.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/dom/Touch.cpp
diff --git a/third_party/WebKit/Source/core/dom/Touch.cpp b/third_party/WebKit/Source/core/dom/Touch.cpp
index d75a1722a6209c0c313521fffaa1eb6f3336bb80..4a5c228e615e258a6f2c8bf65829f048efda21f5 100644
--- a/third_party/WebKit/Source/core/dom/Touch.cpp
+++ b/third_party/WebKit/Source/core/dom/Touch.cpp
@@ -42,7 +42,7 @@ static FloatPoint contentsOffset(LocalFrame* frame)
return FloatPoint(frameView->scrollPosition()).scaledBy(scale);
}
-Touch::Touch(LocalFrame* frame, EventTarget* target, int identifier, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force)
+Touch::Touch(LocalFrame* frame, EventTarget* target, int identifier, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force, String region)
: m_target(target)
, m_identifier(identifier)
, m_clientPos(pagePos - contentsOffset(frame))
@@ -51,12 +51,13 @@ Touch::Touch(LocalFrame* frame, EventTarget* target, int identifier, const Float
, m_radius(radius)
, m_rotationAngle(rotationAngle)
, m_force(force)
+ , m_region(region)
{
float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f;
m_absoluteLocation = roundedLayoutPoint(pagePos.scaledBy(scaleFactor));
}
-Touch::Touch(EventTarget* target, int identifier, const FloatPoint& clientPos, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force, LayoutPoint absoluteLocation)
+Touch::Touch(EventTarget* target, int identifier, const FloatPoint& clientPos, const FloatPoint& screenPos, const FloatPoint& pagePos, const FloatSize& radius, float rotationAngle, float force, String region, LayoutPoint absoluteLocation)
: m_target(target)
, m_identifier(identifier)
, m_clientPos(clientPos)
@@ -65,6 +66,7 @@ Touch::Touch(EventTarget* target, int identifier, const FloatPoint& clientPos, c
, m_radius(radius)
, m_rotationAngle(rotationAngle)
, m_force(force)
+ , m_region(region)
, m_absoluteLocation(absoluteLocation)
{
}
@@ -78,6 +80,7 @@ Touch::Touch(LocalFrame* frame, const TouchInit& initializer)
, m_radius(FloatSize(initializer.radiusX(), initializer.radiusY()))
, m_rotationAngle(initializer.rotationAngle())
, m_force(initializer.force())
+ , m_region(initializer.region())
{
float scaleFactor = frame ? frame->pageZoomFactor() : 1.0f;
m_absoluteLocation = roundedLayoutPoint(m_pagePos.scaledBy(scaleFactor));
@@ -85,7 +88,7 @@ Touch::Touch(LocalFrame* frame, const TouchInit& initializer)
PassRefPtrWillBeRawPtr<Touch> Touch::cloneWithNewTarget(EventTarget* eventTarget) const
{
- return adoptRefWillBeNoop(new Touch(eventTarget, m_identifier, m_clientPos, m_screenPos, m_pagePos, m_radius, m_rotationAngle, m_force, m_absoluteLocation));
+ return adoptRefWillBeNoop(new Touch(eventTarget, m_identifier, m_clientPos, m_screenPos, m_pagePos, m_radius, m_rotationAngle, m_force, m_region, m_absoluteLocation));
}
DEFINE_TRACE(Touch)

Powered by Google App Engine
This is Rietveld 408576698