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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js

Issue 1923393006: DevTools: fix styles and input validation in sensor pane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address change in orientation input labels Created 4 years, 8 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/devtools/front_end/emulation/Geolocation.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js b/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js
index 57b415a206b78dd076d3250fe6fd1145f7d28888..19bcd531c4e519aa24cc745a504bbb929fe1b82d 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js
@@ -85,7 +85,7 @@ WebInspector.Geolocation.parseUserInput = function(latitudeString, longitudeStri
*/
WebInspector.Geolocation.latitudeValidator = function(value)
{
- return !value || (/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(value) && value >= -90 && value <= 90);
+ return /^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(value) && value >= -90 && value <= 90;
lushnikov 2016/05/02 19:25:57 value >= -90 while we're here - let's not use imp
luoe 2016/05/02 21:46:17 Done.
}
/**
@@ -94,7 +94,7 @@ WebInspector.Geolocation.latitudeValidator = function(value)
*/
WebInspector.Geolocation.longitudeValidator = function(value)
{
- return !value || (/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(value) && value >= -180 && value <= 180);
+ return /^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(value) && value >= -180 && value <= 180;
lushnikov 2016/05/02 19:25:57 ditto
luoe 2016/05/02 21:46:17 Done, using parseFloat.
}
WebInspector.Geolocation.DefaultMockAccuracy = 150;

Powered by Google App Engine
This is Rietveld 408576698