Index: content/common/input/synthetic_web_input_event_builders.cc |
diff --git a/content/common/input/synthetic_web_input_event_builders.cc b/content/common/input/synthetic_web_input_event_builders.cc |
index 675df618d8ddbd5e2db690cdbde2a397b3dfa4f8..8883621a7d68e0f15ac4b9a7b403491291be572f 100644 |
--- a/content/common/input/synthetic_web_input_event_builders.cc |
+++ b/content/common/input/synthetic_web_input_event_builders.cc |
@@ -177,6 +177,10 @@ int SyntheticWebTouchEvent::PressPoint(float x, float y) { |
point.position.y = point.screenPosition.y = y; |
point.state = WebTouchPoint::StatePressed; |
point.radiusX = point.radiusY = 1.f; |
+ // Lets give some default values for testing. |
+ point.rotationAngle = 1.f; |
+ point.force = 1.f; |
+ |
++touchesLength; |
WebTouchEventTraits::ResetType( |
WebInputEvent::TouchStart, timeStampSeconds, this); |
@@ -197,6 +201,38 @@ void SyntheticWebTouchEvent::MovePoint(int index, float x, float y) { |
WebInputEvent::TouchMove, timeStampSeconds, this); |
} |
+void SyntheticWebTouchEvent::ChangePointRadius( |
+ int index, |
+ float radiusX, |
+ float radiusY) { |
+ CHECK_GE(index, 0); |
+ CHECK_LT(index, touchesLengthCap); |
+ // Set this bit as in MovePoint(). |
+ causesScrollingIfUncanceled = true; |
+ WebTouchPoint& point = touches[index]; |
+ point.radiusX = radiusX; |
+ point.radiusY = radiusY; |
+ touches[index].state = WebTouchPoint::StateMoved; |
+ WebTouchEventTraits::ResetType( |
+ WebInputEvent::TouchMove, timeStampSeconds, this); |
+} |
+ |
+void SyntheticWebTouchEvent::ChangePointRotationAngleAndForce( |
+ int index, |
+ float rotationAngle, |
+ float force) { |
+ CHECK_GE(index, 0); |
+ CHECK_LT(index, touchesLengthCap); |
+ // Set this bit as in MovePoint(). |
+ causesScrollingIfUncanceled = true; |
+ WebTouchPoint& point = touches[index]; |
+ point.rotationAngle = rotationAngle; |
+ point.force = force; |
+ touches[index].state = WebTouchPoint::StateMoved; |
+ WebTouchEventTraits::ResetType( |
+ WebInputEvent::TouchMove, timeStampSeconds, this); |
+} |
+ |
void SyntheticWebTouchEvent::ReleasePoint(int index) { |
CHECK_GE(index, 0); |
CHECK_LT(index, touchesLengthCap); |