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

Unified Diff: chrome/browser/resources/print_preview/data/print_ticket_store.js

Issue 131013005: Reset only invalid custom margins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | chrome/test/data/webui/print_preview.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/data/print_ticket_store.js
diff --git a/chrome/browser/resources/print_preview/data/print_ticket_store.js b/chrome/browser/resources/print_preview/data/print_ticket_store.js
index 9ca5a8ac88b1d0fd115df459c8131cd553f84cd8..963ee20683a7a67d371b3d8b51c9b3013b70cbcd 100644
--- a/chrome/browser/resources/print_preview/data/print_ticket_store.js
+++ b/chrome/browser/resources/print_preview/data/print_ticket_store.js
@@ -423,10 +423,11 @@ cr.define('print_preview', function() {
cr.dispatchSimpleEvent(this, PrintTicketStore.EventType.INITIALIZE);
} else {
// Reset user selection for certain ticket items.
- this.customMargins_.updateValue(null);
-
if (this.marginsType_.getValue() ==
- print_preview.ticket_items.MarginsType.Value.CUSTOM) {
+ print_preview.ticket_items.MarginsType.Value.CUSTOM &&
+ !this.customMargins_.wouldValueBeValid(
+ this.customMargins_.getValue())) {
+ this.customMargins_.updateValue(null);
this.marginsType_.updateValue(
print_preview.ticket_items.MarginsType.Value.DEFAULT);
}
« no previous file with comments | « no previous file | chrome/test/data/webui/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698