Chromium Code Reviews| 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; |