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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp

Issue 1739613002: DevTools: validate protocol input parameters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined a test. Created 4 years, 10 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/inspector/InspectorInputAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
index cc82320d33c5112d7315d0bc623cb3b1bdbec7cb..77ecd03e3f6e91bcd7b448b26b4e4c9fd4518259 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
@@ -138,19 +138,7 @@ void InspectorInputAgent::dispatchTouchEvent(ErrorString* error, const String& t
int autoId = 0;
for (size_t i = 0; i < touchPoints->length(); ++i) {
- OwnPtr<protocol::Input::TouchPoint> point = touchPoints->get(i);
- if (!point->hasState()) {
- *error = "TouchPoint missing 'state'";
- return;
- }
- if (!point->hasX()) {
- *error = "TouchPoint missing 'x' coordinate";
- return;
- }
- if (!point->hasY()) {
- *error = "TouchPoint missing 'y' coordinate";
- return;
- }
+ protocol::Input::TouchPoint* point = touchPoints->get(i);
int radiusX = point->getRadiusX(1);
int radiusY = point->getRadiusY(1);
double rotationAngle = point->getRotationAngle(0.0);

Powered by Google App Engine
This is Rietveld 408576698