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

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

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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/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 c7a33bd8d2c69f652a4ee115ec5183571064cc53..df4dc00d0e86576953c7bbbe874ee9f98d37a869 100644
--- a/chrome/browser/resources/print_preview/data/ticket_items/landscape.js
+++ b/chrome/browser/resources/print_preview/data/ticket_items/landscape.js
@@ -22,14 +22,11 @@ cr.define('print_preview.ticket_items', function() {
* @constructor
* @extends {print_preview.ticket_items.TicketItem}
*/
- function Landscape(appState, destinationStore, documentInfo, marginsType,
- customMargins) {
+ function Landscape(
+ appState, destinationStore, documentInfo, marginsType, customMargins) {
print_preview.ticket_items.TicketItem.call(
- this,
- appState,
- print_preview.AppStateField.IS_LANDSCAPE_ENABLED,
- destinationStore,
- documentInfo);
+ this, appState, print_preview.AppStateField.IS_LANDSCAPE_ENABLED,
+ destinationStore, documentInfo);
/**
* Margins ticket item. Reset when landscape ticket item changes.
@@ -63,8 +60,7 @@ cr.define('print_preview.ticket_items', function() {
var hasLandscapeOption = false;
cap.option.forEach(function(option) {
hasAutoOrPortraitOption = hasAutoOrPortraitOption ||
- option.type == 'AUTO' ||
- option.type == 'PORTRAIT';
+ option.type == 'AUTO' || option.type == 'PORTRAIT';
hasLandscapeOption = hasLandscapeOption || option.type == 'LANDSCAPE';
});
// TODO(rltoscano): Technically, the print destination can still change
@@ -73,8 +69,7 @@ cr.define('print_preview.ticket_items', function() {
// case so it would be a bad user experience.
return this.getDocumentInfoInternal().isModifiable &&
!this.getDocumentInfoInternal().hasCssMediaStyles &&
- hasAutoOrPortraitOption &&
- hasLandscapeOption;
+ hasAutoOrPortraitOption && hasLandscapeOption;
},
/** @override */
@@ -103,7 +98,7 @@ cr.define('print_preview.ticket_items', function() {
if (updateMargins) {
// Reset the user set margins when page orientation changes.
this.marginsType_.updateValue(
- print_preview.ticket_items.MarginsTypeValue.DEFAULT);
+ print_preview.ticket_items.MarginsTypeValue.DEFAULT);
this.customMargins_.updateValue(null);
}
},
@@ -127,16 +122,12 @@ cr.define('print_preview.ticket_items', function() {
*/
getPageOrientationCapability_: function() {
var dest = this.getSelectedDestInternal();
- return (dest &&
- dest.capabilities &&
- dest.capabilities.printer &&
+ return (dest && dest.capabilities && dest.capabilities.printer &&
dest.capabilities.printer.page_orientation) ||
- null;
+ null;
}
};
// Export
- return {
- Landscape: Landscape
- };
+ return {Landscape: Landscape};
});

Powered by Google App Engine
This is Rietveld 408576698