| Index: content/shell/renderer/test_runner/event_sender.cc
|
| diff --git a/content/shell/renderer/test_runner/event_sender.cc b/content/shell/renderer/test_runner/event_sender.cc
|
| index e54a95872fe3f239c7419605f20afb26038ba3c8..a8ae52231c5f1fc97b78e2edbaac0f75de911c96 100644
|
| --- a/content/shell/renderer/test_runner/event_sender.cc
|
| +++ b/content/shell/renderer/test_runner/event_sender.cc
|
| @@ -381,8 +381,12 @@ class EventSenderBindings : public gin::Wrappable<EventSenderBindings> {
|
| void SetPageScaleFactorLimits(gin::Arguments* args);
|
| void ClearTouchPoints();
|
| void ReleaseTouchPoint(unsigned index);
|
| - void UpdateTouchPoint(unsigned index, double x, double y);
|
| + void UpdateTouchPoint(unsigned index, float x, float y);
|
| void CancelTouchPoint(unsigned index);
|
| + void SetTouchPointTilt(unsigned index,
|
| + float tils,
|
| + float tiltDirection,
|
| + bool set_state_moved);
|
| void SetTouchModifier(const std::string& key_name, bool set_mask);
|
| void SetTouchCancelable(bool cancelable);
|
| void DumpFilenameBeingDragged();
|
| @@ -518,6 +522,7 @@ EventSenderBindings::GetObjectTemplateBuilder(v8::Isolate* isolate) {
|
| .SetMethod("releaseTouchPoint", &EventSenderBindings::ReleaseTouchPoint)
|
| .SetMethod("updateTouchPoint", &EventSenderBindings::UpdateTouchPoint)
|
| .SetMethod("cancelTouchPoint", &EventSenderBindings::CancelTouchPoint)
|
| + .SetMethod("setTouchPointTilt", &EventSenderBindings::SetTouchPointTilt)
|
| .SetMethod("setTouchModifier", &EventSenderBindings::SetTouchModifier)
|
| .SetMethod("setTouchCancelable", &EventSenderBindings::SetTouchCancelable)
|
| .SetMethod("dumpFilenameBeingDragged",
|
| @@ -697,9 +702,9 @@ void EventSenderBindings::ReleaseTouchPoint(unsigned index) {
|
| sender_->ReleaseTouchPoint(index);
|
| }
|
|
|
| -void EventSenderBindings::UpdateTouchPoint(unsigned index, double x, double y) {
|
| +void EventSenderBindings::UpdateTouchPoint(unsigned index, float x, float y) {
|
| if (sender_)
|
| - sender_->UpdateTouchPoint(index, static_cast<float>(x), static_cast<float>(y));
|
| + sender_->UpdateTouchPoint(index, x, y);
|
| }
|
|
|
| void EventSenderBindings::CancelTouchPoint(unsigned index) {
|
| @@ -707,6 +712,14 @@ void EventSenderBindings::CancelTouchPoint(unsigned index) {
|
| sender_->CancelTouchPoint(index);
|
| }
|
|
|
| +void EventSenderBindings::SetTouchPointTilt(unsigned index,
|
| + float tilt,
|
| + float tiltDirection,
|
| + bool set_state_moved) {
|
| + if (sender_)
|
| + sender_->SetTouchPointTilt(index, tilt, tiltDirection, set_state_moved);
|
| +}
|
| +
|
| void EventSenderBindings::SetTouchModifier(const std::string& key_name,
|
| bool set_mask) {
|
| if (sender_)
|
| @@ -1617,6 +1630,22 @@ void EventSender::CancelTouchPoint(unsigned index) {
|
| touch_point->state = WebTouchPoint::StateCancelled;
|
| }
|
|
|
| +void EventSender::SetTouchPointTilt(unsigned index,
|
| + float tilt,
|
| + float tiltDirection,
|
| + bool set_state_moved) {
|
| + if (index >= touch_points_.size()) {
|
| + ThrowTouchPointError();
|
| + return;
|
| + }
|
| +
|
| + WebTouchPoint* touch_point = &touch_points_[index];
|
| + touch_point->tilt = tilt;
|
| + touch_point->tiltDirection = tiltDirection;
|
| + if (set_state_moved)
|
| + touch_point->state = WebTouchPoint::StateMoved;
|
| +}
|
| +
|
| void EventSender::SetTouchModifier(const std::string& key_name,
|
| bool set_mask) {
|
| int mask = 0;
|
|
|