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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceOrientation.js

Issue 1923393006: DevTools: fix styles and input validation in sensor pane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Orientation labels now alpha-beta-gamma Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {number} alpha 7 * @param {number} alpha
8 * @param {number} beta 8 * @param {number} beta
9 * @param {number} gamma 9 * @param {number} gamma
10 */ 10 */
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 return new WebInspector.DeviceOrientation(alpha, beta, gamma); 71 return new WebInspector.DeviceOrientation(alpha, beta, gamma);
72 } 72 }
73 73
74 /** 74 /**
75 * @param {string} value 75 * @param {string} value
76 * @return {boolean} 76 * @return {boolean}
77 */ 77 */
78 WebInspector.DeviceOrientation.validator = function(value) 78 WebInspector.DeviceOrientation.validator = function(value)
79 { 79 {
80 return !value || /^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(value); 80 return /^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(value);
81 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698