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

Unified Diff: chrome/browser/resources/gesture_config.js

Issue 12381045: chrome://gesture fixes: Fix a couple of issues with form validation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/gesture_config.js
diff --git a/chrome/browser/resources/gesture_config.js b/chrome/browser/resources/gesture_config.js
index be2c1288e7f75ebaaef646e8e2e70e1182f24dbb..7255d714516f42d18ae3c162dfb2a552b4e3b2c6 100644
--- a/chrome/browser/resources/gesture_config.js
+++ b/chrome/browser/resources/gesture_config.js
@@ -58,8 +58,10 @@ GeneralConfig.prototype = {
input.id = field.key;
input.min = field.min || 0;
- if (field.max) input.max = field.max;
- if (field.step) input.step = field.step;
+ if (field.max)
+ input.max = field.max;
+
+ input.step = field.step || 'any';
if (field.units)
units.innerHTML = field.units;
@@ -254,22 +256,26 @@ function GestureConfig() {
{
key: 'fling_acceleration_curve_coefficient_0',
label: 'Touchscreen Fling Acceleration',
- units: 'x<sup>3</sup>'
+ units: 'x<sup>3</sup>',
+ min: '-1'
},
{
key: 'fling_acceleration_curve_coefficient_1',
label: '+',
- units: 'x<sup>2</sup>'
+ units: 'x<sup>2</sup>',
+ min: '-1'
},
{
key: 'fling_acceleration_curve_coefficient_2',
label: '+',
- units: 'x<sup>1</sup>'
+ units: 'x<sup>1</sup>',
+ min: '-1'
},
{
key: 'fling_acceleration_curve_coefficient_3',
label: '+',
- units: 'x<sup>0</sup>'
+ units: 'x<sup>0</sup>',
+ min: '-1'
},
{
key: 'fling_velocity_cap',
@@ -356,7 +362,8 @@ function WorkspaceCyclerConfig() {
{
key: 'min_brightness',
label: 'Minimum workspace brightness (deepest & shallowest workspace)',
- units: '%'
+ units: '%',
+ min: '-1'
},
{
key: 'background_opacity',
@@ -366,7 +373,8 @@ function WorkspaceCyclerConfig() {
{
key: 'desktop_workspace_brightness',
label: 'Desktop workspace brightness when cycling through workspaces',
- units: '%'
+ units: '%',
+ min: '-1'
},
{
key: 'distance_to_initiate_cycling',
@@ -410,32 +418,38 @@ function FlingConfig() {
{
key: 'touchscreen_alpha',
label: 'Touchscreen fling deacceleration coefficients',
- units: 'alpha'
+ units: 'alpha',
+ min: '-inf'
},
{
key: 'touchscreen_beta',
label: '',
- units: 'beta'
+ units: 'beta',
+ min: '-inf'
},
{
key: 'touchscreen_gamma',
label: '',
- units: 'gamma'
+ units: 'gamma',
+ min: '-inf'
},
{
key: 'touchpad_alpha',
label: 'Touchpad fling deacceleration coefficients',
- units: 'alpha'
+ units: 'alpha',
+ min: '-inf'
},
{
key: 'touchpad_beta',
label: '',
- units: 'beta'
+ units: 'beta',
+ min: '-inf'
},
{
key: 'touchpad_gamma',
label: '',
- units: 'gamma'
+ units: 'gamma',
+ min: '-inf'
},
];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698