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

Unified Diff: chrome/browser/resources/print_preview/data/ticket_items/scaling.js

Issue 2713033003: Print Preview: Show error message if text is typed in Copies section (Closed)
Patch Set: Remove unnecessary diff Created 3 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
Index: chrome/browser/resources/print_preview/data/ticket_items/scaling.js
diff --git a/chrome/browser/resources/print_preview/data/ticket_items/scaling.js b/chrome/browser/resources/print_preview/data/ticket_items/scaling.js
index c7f3a37fb58fbc24f7c247fa2db982dd3a15bcf1..b5961dcec7cc96ebf07982f2b8889721ebe4ec0e 100644
--- a/chrome/browser/resources/print_preview/data/ticket_items/scaling.js
+++ b/chrome/browser/resources/print_preview/data/ticket_items/scaling.js
@@ -45,26 +45,14 @@ cr.define('print_preview.ticket_items', function() {
/** @override */
wouldValueBeValid: function(value) {
- if (/[^\d]+/.test(value)) {
- return false;
- }
- var scaling = parseInt(value, 10);
- return scaling >= Scaling.MIN_VAL && scaling <= Scaling.MAX_VAL;
- },
+ return true;
dpapad 2017/02/27 21:56:02 Is this resulting in the same behavior as before?
rbpotter 2017/02/28 00:12:59 It should be. This function was only called in isV
+ },
/** @override */
isValueEqual: function(value) {
return this.getValueAsNumber() == value;
},
- /**
- * @param {number} The desired scaling percentage.
- * @return {number} Nearest valid scaling percentage
- */
- getNearestValidValue: function(value) {
- return Math.min(Math.max(value, Scaling.MIN_VAL), Scaling.MAX_VAL);
- },
-
/** @override */
isCapabilityAvailable: function() {
// This is not a function of the printer, but should be disabled if we are

Powered by Google App Engine
This is Rietveld 408576698