Index: chrome/browser/resources/print_preview/data/ticket_items/landscape.js |
diff --git a/chrome/browser/resources/print_preview/data/ticket_items/landscape.js b/chrome/browser/resources/print_preview/data/ticket_items/landscape.js |
index 907e54f2edeeb96eee841993c73921f1368f8ad6..001df4ede1b603ba6b47077b02174aae8b169271 100644 |
--- a/chrome/browser/resources/print_preview/data/ticket_items/landscape.js |
+++ b/chrome/browser/resources/print_preview/data/ticket_items/landscape.js |
@@ -91,7 +91,9 @@ cr.define('print_preview.ticket_items', function() { |
/** @override */ |
getCapabilityNotAvailableValueInternal: function() { |
var doc = this.getDocumentInfoInternal(); |
- return doc.hasCssMediaStyles ? |
+ // TODO(vitalybuka): For landscape PDF dimmensions should be |
Aleksey Shlyapnikov
2014/09/18 19:03:01
dimensions
Vitaly Buka (NO REVIEWS)
2014/09/18 19:08:46
Done.
|
+ // width > height. Find why it's not true. |
+ return (!doc.isModifiable || doc.hasCssMediaStyles) ? |
Aleksey Shlyapnikov
2014/09/18 19:03:01
Let's not add this check.
Vitaly Buka (NO REVIEWS)
2014/09/18 19:08:46
Done.
|
(doc.pageSize.width > doc.pageSize.height) : |
false; |
}, |
@@ -110,6 +112,22 @@ cr.define('print_preview.ticket_items', function() { |
}, |
/** |
+ * @return {boolean} Whether capability contains the |value|. |
+ * @param {string} value Option to check. |
+ */ |
+ hasOption: function(value) { |
+ var cap = this.getPageOrientationCapability_(); |
+ if (!cap) { |
+ return false; |
+ } |
Aleksey Shlyapnikov
2014/09/18 19:03:01
Remove brackets.
Vitaly Buka (NO REVIEWS)
2014/09/18 19:08:46
Done.
|
+ var result = false; |
+ cap.option.forEach(function(option) { |
Aleksey Shlyapnikov
2014/09/18 19:03:01
return capability.option.some(...
Vitaly Buka (NO REVIEWS)
2014/09/18 19:08:46
Done.
|
+ result = result || option.type == value; |
+ }); |
+ return result; |
+ }, |
+ |
+ /** |
* @return {Object} Page orientation capability of the selected destination. |
* @private |
*/ |