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

Unified Diff: content/shell/renderer/test_runner/EventSender.cpp

Issue 140973005: Chrome allows WebTouchPoint to store WebFloatPoint, instead of WebPoint. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use static_cast. Created 6 years, 11 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
« no previous file with comments | « content/renderer/render_widget.cc ('k') | content/shell/renderer/test_runner/TestPlugin.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/EventSender.cpp
diff --git a/content/shell/renderer/test_runner/EventSender.cpp b/content/shell/renderer/test_runner/EventSender.cpp
index 4c53fce769cc4accfe4c53b8fe8d70f06c20cc51..c85dfdfd7f6214e324f10a894e574c3ba363297b 100644
--- a/content/shell/renderer/test_runner/EventSender.cpp
+++ b/content/shell/renderer/test_runner/EventSender.cpp
@@ -967,7 +967,8 @@ void EventSender::addTouchPoint(const CppArgumentList& arguments, CppVariant* re
WebTouchPoint touchPoint;
touchPoint.state = WebTouchPoint::StatePressed;
- touchPoint.position = WebPoint(arguments[0].toInt32(), arguments[1].toInt32());
+ touchPoint.position.x = arguments[0].toInt32();
+ touchPoint.position.y = arguments[1].toInt32();
touchPoint.screenPosition = touchPoint.position;
if (arguments.size() > 2) {
@@ -1034,11 +1035,11 @@ void EventSender::updateTouchPoint(const CppArgumentList& arguments, CppVariant*
const unsigned index = arguments[0].toInt32();
BLINK_ASSERT(index < touchPoints.size());
- WebPoint position(arguments[1].toInt32(), arguments[2].toInt32());
WebTouchPoint* touchPoint = &touchPoints[index];
touchPoint->state = WebTouchPoint::StateMoved;
- touchPoint->position = position;
- touchPoint->screenPosition = position;
+ touchPoint->position.x = arguments[1].toInt32();
+ touchPoint->position.y = arguments[2].toInt32();
+ touchPoint->screenPosition = touchPoint->position;
}
void EventSender::cancelTouchPoint(const CppArgumentList& arguments, CppVariant* result)
« no previous file with comments | « content/renderer/render_widget.cc ('k') | content/shell/renderer/test_runner/TestPlugin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698