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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 return ""; | 258 return ""; |
259 return WebInspector.UIString("Value must be non-negative integer"); | 259 return WebInspector.UIString("Value must be non-negative integer"); |
260 } | 260 } |
261 | 261 |
262 /** | 262 /** |
263 * @param {string} value | 263 * @param {string} value |
264 * @return {string} | 264 * @return {string} |
265 */ | 265 */ |
266 WebInspector.OverridesSupport.deviceScaleFactorValidator = function(value) | 266 WebInspector.OverridesSupport.deviceScaleFactorValidator = function(value) |
267 { | 267 { |
268 if (!value || (/^[\d]+(\.\d+)?|\.\d+$/.test(value) && value >= 0 && value <=
10000)) | 268 if (!value || (/^[\d]+(\.\d+)?|\.\d+$/.test(value) && value >= 0 && value <=
10)) |
269 return ""; | 269 return ""; |
270 return WebInspector.UIString("Value must be non-negative float"); | 270 return WebInspector.UIString("Value must be non-negative float"); |
271 } | 271 } |
272 | 272 |
273 /** | 273 /** |
274 * @param {string} value | 274 * @param {string} value |
275 * @return {string} | 275 * @return {string} |
276 */ | 276 */ |
277 WebInspector.OverridesSupport.networkDomainsValidator = function(value) | 277 WebInspector.OverridesSupport.networkDomainsValidator = function(value) |
278 { | 278 { |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 * @return {!Element} | 987 * @return {!Element} |
988 */ | 988 */ |
989 createDeviceSelect: function(document) | 989 createDeviceSelect: function(document) |
990 { | 990 { |
991 var deviceSelectElement = document.createElement("select"); | 991 var deviceSelectElement = document.createElement("select"); |
992 deviceSelectElement.disabled = WebInspector.overridesSupport.isInspectin
gDevice(); | 992 deviceSelectElement.disabled = WebInspector.overridesSupport.isInspectin
gDevice(); |
993 | 993 |
994 var devices = WebInspector.OverridesSupport._phones.concat(WebInspector.
OverridesSupport._tablets).concat(WebInspector.OverridesSupport._desktops); | 994 var devices = WebInspector.OverridesSupport._phones.concat(WebInspector.
OverridesSupport._tablets).concat(WebInspector.OverridesSupport._desktops); |
995 devices.sort(); | 995 devices.sort(); |
996 | 996 |
997 var selectDevice = [WebInspector.UIString("<Select device>"), "", ""]; | 997 var selectDevice = [WebInspector.UIString("<Select model>"), "", ""]; |
998 devices = devices.concat([selectDevice]); | 998 devices = devices.concat([selectDevice]); |
999 for (var i = 0; i < devices.length; ++i) { | 999 for (var i = 0; i < devices.length; ++i) { |
1000 var device = devices[i]; | 1000 var device = devices[i]; |
1001 var option = new Option(device[0], device[0]); | 1001 var option = new Option(device[0], device[0]); |
1002 option.device = new WebInspector.OverridesSupport.Device(device[2],
device[1]); | 1002 option.device = new WebInspector.OverridesSupport.Device(device[2],
device[1]); |
1003 deviceSelectElement.add(option); | 1003 deviceSelectElement.add(option); |
1004 } | 1004 } |
1005 | 1005 |
1006 deviceSelectElement.addEventListener("change", deviceSelected, false); | 1006 deviceSelectElement.addEventListener("change", deviceSelected, false); |
1007 | 1007 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 break; | 1081 break; |
1082 } | 1082 } |
1083 } | 1083 } |
1084 if (!selectionRestored) | 1084 if (!selectionRestored) |
1085 throughputSelectElement.selectedIndex = options.length - 1; | 1085 throughputSelectElement.selectedIndex = options.length - 1; |
1086 } | 1086 } |
1087 | 1087 |
1088 return throughputSelectElement; | 1088 return throughputSelectElement; |
1089 }, | 1089 }, |
1090 | 1090 |
| 1091 reveal: function() |
| 1092 { |
| 1093 WebInspector.Revealer.reveal(this); |
| 1094 }, |
| 1095 |
1091 __proto__: WebInspector.Object.prototype | 1096 __proto__: WebInspector.Object.prototype |
1092 } | 1097 } |
1093 | 1098 |
1094 | 1099 |
1095 /** | 1100 /** |
1096 * @type {!WebInspector.OverridesSupport} | 1101 * @type {!WebInspector.OverridesSupport} |
1097 */ | 1102 */ |
1098 WebInspector.overridesSupport; | 1103 WebInspector.overridesSupport; |
OLD | NEW |