OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 257 |
258 for (var i = 0; i < options.length; ++i) { | 258 for (var i = 0; i < options.length; ++i) { |
259 var option = options[i]; | 259 var option = options[i]; |
260 select.add(new Option(option[0], option[1])); | 260 select.add(new Option(option[0], option[1])); |
261 if (settingValue === option[1]) | 261 if (settingValue === option[1]) |
262 select.selectedIndex = i; | 262 select.selectedIndex = i; |
263 } | 263 } |
264 | 264 |
265 function changeListener(e) | 265 function changeListener(e) |
266 { | 266 { |
267 // Don't use e.target.value to avoid conversion of the value to stri
ng. | 267 setting.set(e.target.value); |
268 setting.set(options[select.selectedIndex][1]); | |
269 } | 268 } |
270 | 269 |
271 select.addEventListener("change", changeListener, false); | 270 select.addEventListener("change", changeListener, false); |
272 return p; | 271 return p; |
273 }, | 272 }, |
274 | 273 |
275 /** | 274 /** |
276 * @param {string} label | 275 * @param {string} label |
277 * @param {WebInspector.Setting} setting | 276 * @param {WebInspector.Setting} setting |
278 * @param {boolean} numeric | 277 * @param {boolean} numeric |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 fieldset = WebInspector.SettingsTab.createSettingFieldset(WebInspector.s
ettings.skipStackFramesSwitch); | 405 fieldset = WebInspector.SettingsTab.createSettingFieldset(WebInspector.s
ettings.skipStackFramesSwitch); |
407 fieldset.appendChild(this._createInputSetting(WebInspector.UIString("Pat
tern"), WebInspector.settings.skipStackFramesPattern, false, 1000, "100px", WebI
nspector.SettingsScreen.regexValidator)); | 406 fieldset.appendChild(this._createInputSetting(WebInspector.UIString("Pat
tern"), WebInspector.settings.skipStackFramesPattern, false, 1000, "100px", WebI
nspector.SettingsScreen.regexValidator)); |
408 checkbox.appendChild(fieldset); | 407 checkbox.appendChild(fieldset); |
409 p.appendChild(checkbox); | 408 p.appendChild(checkbox); |
410 } | 409 } |
411 WebInspector.settings.skipStackFramesSwitch.addChangeListener(this._skipStac
kFramesSwitchOrPatternChanged, this); | 410 WebInspector.settings.skipStackFramesSwitch.addChangeListener(this._skipStac
kFramesSwitchOrPatternChanged, this); |
412 WebInspector.settings.skipStackFramesPattern.addChangeListener(this._skipSta
ckFramesSwitchOrPatternChanged, this); | 411 WebInspector.settings.skipStackFramesPattern.addChangeListener(this._skipSta
ckFramesSwitchOrPatternChanged, this); |
413 | 412 |
414 p = this._appendSection(WebInspector.UIString("Profiler")); | 413 p = this._appendSection(WebInspector.UIString("Profiler")); |
415 p.appendChild(WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UI
String("Show advanced heap snapshot properties"), WebInspector.settings.showAdva
ncedHeapSnapshotProperties)); | 414 p.appendChild(WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UI
String("Show advanced heap snapshot properties"), WebInspector.settings.showAdva
ncedHeapSnapshotProperties)); |
416 p.appendChild(WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UI
String("High resolution CPU profiling"), WebInspector.settings.highResolutionCpu
Profiling)); | |
417 | 415 |
418 p = this._appendSection(WebInspector.UIString("Timeline")); | 416 p = this._appendSection(WebInspector.UIString("Timeline")); |
419 checkbox = WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UIStr
ing("Limit number of captured JS stack frames"), WebInspector.settings.timelineL
imitStackFramesFlag); | 417 checkbox = WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UIStr
ing("Limit number of captured JS stack frames"), WebInspector.settings.timelineL
imitStackFramesFlag); |
420 p.appendChild(checkbox); | 418 p.appendChild(checkbox); |
421 | 419 |
422 fieldset = WebInspector.SettingsTab.createSettingFieldset(WebInspector.setti
ngs.timelineLimitStackFramesFlag); | 420 fieldset = WebInspector.SettingsTab.createSettingFieldset(WebInspector.setti
ngs.timelineLimitStackFramesFlag); |
423 var frameCountValidator = WebInspector.SettingsScreen.integerValidator.bind(
this, 0, 99); | 421 var frameCountValidator = WebInspector.SettingsScreen.integerValidator.bind(
this, 0, 99); |
424 fieldset.appendChild(this._createInputSetting(WebInspector.UIString("Frames
to capture"), WebInspector.settings.timelineStackFramesToCapture, true, 2, "2em"
, frameCountValidator)); | 422 fieldset.appendChild(this._createInputSetting(WebInspector.UIString("Frames
to capture"), WebInspector.settings.timelineStackFramesToCapture, true, 2, "2em"
, frameCountValidator)); |
425 checkbox.appendChild(fieldset); | 423 checkbox.appendChild(fieldset); |
426 | 424 |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1226 var columns = this.columns(); | 1224 var columns = this.columns(); |
1227 for (var i = 0; i < columns.length; ++i) { | 1225 for (var i = 0; i < columns.length; ++i) { |
1228 var columnId = columns[i]; | 1226 var columnId = columns[i]; |
1229 var inputElement = this._addInputElements[columnId]; | 1227 var inputElement = this._addInputElements[columnId]; |
1230 inputElement.value = ""; | 1228 inputElement.value = ""; |
1231 } | 1229 } |
1232 }, | 1230 }, |
1233 | 1231 |
1234 __proto__: WebInspector.SettingsList.prototype | 1232 __proto__: WebInspector.SettingsList.prototype |
1235 } | 1233 } |
OLD | NEW |