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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js

Issue 1642233002: [DevTools] Cleanup various bindInput implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@device-mode-cleanup-misc
Patch Set: Created 4 years, 11 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 | third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
index 4f18f1837787ea50b50b001153c4485dd95afedd..6972b9a7d8ef1ac36fd35016585cfcf827208638 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
@@ -85,24 +85,24 @@ WebInspector.DeviceModeModel.MaxDeviceSize = 9999;
/**
* @param {string} value
- * @return {string}
+ * @return {boolean}
*/
WebInspector.DeviceModeModel.deviceSizeValidator = function(value)
{
if (/^[\d]+$/.test(value) && value >= WebInspector.DeviceModeModel.MinDeviceSize && value <= WebInspector.DeviceModeModel.MaxDeviceSize)
- return "";
- return WebInspector.UIString("Value must be positive integer");
+ return true;
+ return false;
}
/**
* @param {string} value
- * @return {string}
+ * @return {boolean}
*/
WebInspector.DeviceModeModel.deviceScaleFactorValidator = function(value)
{
if (!value || (/^[\d]+(\.\d+)?|\.\d+$/.test(value) && value >= 0 && value <= 10))
- return "";
- return WebInspector.UIString("Value must be non-negative float");
+ return true;
+ return false;
}
WebInspector.DeviceModeModel._touchEventsScriptIdSymbol = Symbol("DeviceModeModel.touchEventsScriptIdSymbol");
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698