| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 return new WebInspector.OverridesSupport.DeviceOrientation(alpha, beta, gamm
a); | 253 return new WebInspector.OverridesSupport.DeviceOrientation(alpha, beta, gamm
a); |
| 254 } | 254 } |
| 255 | 255 |
| 256 WebInspector.OverridesSupport.DeviceOrientation.clearDeviceOrientationOverride =
function() | 256 WebInspector.OverridesSupport.DeviceOrientation.clearDeviceOrientationOverride =
function() |
| 257 { | 257 { |
| 258 PageAgent.clearDeviceOrientationOverride(); | 258 PageAgent.clearDeviceOrientationOverride(); |
| 259 } | 259 } |
| 260 | 260 |
| 261 /** | 261 /** |
| 262 * @param {string} value | 262 * @param {string} value |
| 263 * @return {!string} | 263 * @return {string} |
| 264 */ | 264 */ |
| 265 WebInspector.OverridesSupport.integerInputValidator = function(value) | 265 WebInspector.OverridesSupport.integerInputValidator = function(value) |
| 266 { | 266 { |
| 267 if (/^[\d]+$/.test(value) && value >= 0 && value <= 10000) | 267 if (/^[\d]+$/.test(value) && value >= 0 && value <= 10000) |
| 268 return ""; | 268 return ""; |
| 269 return WebInspector.UIString("Value must be non-negative integer"); | 269 return WebInspector.UIString("Value must be non-negative integer"); |
| 270 } | 270 } |
| 271 | 271 |
| 272 /** | 272 /** |
| 273 * @param {string} value | 273 * @param {string} value |
| 274 * @return {!string} | 274 * @return {string} |
| 275 */ | 275 */ |
| 276 WebInspector.OverridesSupport.doubleInputValidator = function(value) | 276 WebInspector.OverridesSupport.doubleInputValidator = function(value) |
| 277 { | 277 { |
| 278 if (/^[\d]+(\.\d+)?|\.\d+$/.test(value) && value >= 0 && value <= 10000) | 278 if (/^[\d]+(\.\d+)?|\.\d+$/.test(value) && value >= 0 && value <= 10000) |
| 279 return ""; | 279 return ""; |
| 280 return WebInspector.UIString("Value must be non-negative float"); | 280 return WebInspector.UIString("Value must be non-negative float"); |
| 281 } | 281 } |
| 282 | 282 |
| 283 /** | 283 /** |
| 284 * @param {string} value | 284 * @param {string} value |
| 285 * @return {!string} | 285 * @return {string} |
| 286 */ | 286 */ |
| 287 WebInspector.OverridesSupport.networkDomainsValidator = function(value) | 287 WebInspector.OverridesSupport.networkDomainsValidator = function(value) |
| 288 { | 288 { |
| 289 function test(s) | 289 function test(s) |
| 290 { | 290 { |
| 291 return /^[\w\-]+(\.[\w\-]+)*$/.test(s.trim()); | 291 return /^[\w\-]+(\.[\w\-]+)*$/.test(s.trim()); |
| 292 } | 292 } |
| 293 | 293 |
| 294 if (!value.trim()) | 294 if (!value.trim()) |
| 295 return ""; | 295 return ""; |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 }, | 1229 }, |
| 1230 | 1230 |
| 1231 __proto__: WebInspector.Object.prototype | 1231 __proto__: WebInspector.Object.prototype |
| 1232 } | 1232 } |
| 1233 | 1233 |
| 1234 | 1234 |
| 1235 /** | 1235 /** |
| 1236 * @type {!WebInspector.OverridesSupport} | 1236 * @type {!WebInspector.OverridesSupport} |
| 1237 */ | 1237 */ |
| 1238 WebInspector.overridesSupport; | 1238 WebInspector.overridesSupport; |
| OLD | NEW |