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

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

Issue 580203002: Set orientation to 'AUTO' if we hide orientation option from user. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Thu Sep 18 12:07:42 PDT 2014 Created 6 years, 3 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/browser/resources/print_preview/data/ticket_items/landscape.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 6324762a03c7fc05382b2523c9ddd6bbc660dcf1..c23a98000ef411e112747008d6af60bf94775521 100644
--- a/chrome/browser/resources/print_preview/data/print_ticket_store.js
+++ b/chrome/browser/resources/print_preview/data/print_ticket_store.js
@@ -420,8 +420,13 @@ cr.define('print_preview', function() {
vendor_id: value.vendor_id
};
}
- if (this.landscape.isCapabilityAvailable() &&
- this.landscape.isUserEdited()) {
+ if (!this.landscape.isCapabilityAvailable()) {
+ // In this case "orientation" option is hidden from user, so user can't
+ // adjust it for page content, see Landscape.isCapabilityAvailable().
+ // We can improve results if we set AUTO here.
+ if (this.landscape.hasOption('AUTO'))
+ cjt.print.page_orientation = { type: 'AUTO' };
+ } else if (this.landscape.isUserEdited()) {
cjt.print.page_orientation =
{type: this.landscape.getValue() ? 'LANDSCAPE' : 'PORTRAIT'};
}
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/data/ticket_items/landscape.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698