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

Unified Diff: chrome/browser/resources/print_preview/settings/other_options_settings.js

Issue 595153003: Compile print_preview, part 5: reduce down to 104 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview_4
Patch Set: revert movement of enums: now handle in compiler pass 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
Index: chrome/browser/resources/print_preview/settings/other_options_settings.js
diff --git a/chrome/browser/resources/print_preview/settings/other_options_settings.js b/chrome/browser/resources/print_preview/settings/other_options_settings.js
index dd8a3fde574580ca9e320380906c76beea715658..95a58f88cd0bd7d2f2c8135125b515eab721ba84 100644
--- a/chrome/browser/resources/print_preview/settings/other_options_settings.js
+++ b/chrome/browser/resources/print_preview/settings/other_options_settings.js
@@ -161,43 +161,43 @@ cr.define('print_preview', function() {
enterDocument: function() {
print_preview.SettingsSection.prototype.enterDocument.call(this);
this.tracker.add(
- this.headerFooterCheckbox_,
+ assert(this.headerFooterCheckbox_),
'click',
this.onHeaderFooterCheckboxClick_.bind(this));
this.tracker.add(
- this.fitToPageCheckbox_,
+ assert(this.fitToPageCheckbox_),
'click',
this.onFitToPageCheckboxClick_.bind(this));
this.tracker.add(
- this.duplexCheckbox_,
+ assert(this.duplexCheckbox_),
'click',
this.onDuplexCheckboxClick_.bind(this));
this.tracker.add(
- this.cssBackgroundCheckbox_,
+ assert(this.cssBackgroundCheckbox_),
'click',
this.onCssBackgroundCheckboxClick_.bind(this));
this.tracker.add(
- this.selectionOnlyCheckbox_,
+ assert(this.selectionOnlyCheckbox_),
'click',
this.onSelectionOnlyCheckboxClick_.bind(this));
this.tracker.add(
- this.duplexTicketItem_,
+ assert(this.duplexTicketItem_),
print_preview.ticket_items.TicketItem.EventType.CHANGE,
this.onDuplexChange_.bind(this));
this.tracker.add(
- this.fitToPageTicketItem_,
+ assert(this.fitToPageTicketItem_),
print_preview.ticket_items.TicketItem.EventType.CHANGE,
this.onFitToPageChange_.bind(this));
this.tracker.add(
- this.cssBackgroundTicketItem_,
+ assert(this.cssBackgroundTicketItem_),
print_preview.ticket_items.TicketItem.EventType.CHANGE,
this.onCssBackgroundChange_.bind(this));
this.tracker.add(
- this.selectionOnlyTicketItem_,
+ assert(this.selectionOnlyTicketItem_),
print_preview.ticket_items.TicketItem.EventType.CHANGE,
this.onSelectionOnlyChange_.bind(this));
this.tracker.add(
- this.headerFooterTicketItem_,
+ assert(this.headerFooterTicketItem_),
print_preview.ticket_items.TicketItem.EventType.CHANGE,
this.onHeaderFooterChange_.bind(this));
},
@@ -244,18 +244,18 @@ cr.define('print_preview', function() {
/** @override */
updateUiStateInternal: function() {
if (this.isAvailable()) {
- setIsVisible(this.headerFooterContainer_,
+ setIsVisible(assert(this.headerFooterContainer_),
this.headerFooterTicketItem_.isCapabilityAvailable() &&
!this.collapseContent);
- setIsVisible(this.fitToPageContainer_,
+ setIsVisible(assert(this.fitToPageContainer_),
this.fitToPageTicketItem_.isCapabilityAvailable() &&
!this.collapseContent);
- setIsVisible(this.duplexContainer_,
+ setIsVisible(assert(this.duplexContainer_),
this.duplexTicketItem_.isCapabilityAvailable());
- setIsVisible(this.cssBackgroundContainer_,
+ setIsVisible(assert(this.cssBackgroundContainer_),
this.cssBackgroundTicketItem_.isCapabilityAvailable() &&
!this.collapseContent);
- setIsVisible(this.selectionOnlyContainer_,
+ setIsVisible(assert(this.selectionOnlyContainer_),
this.selectionOnlyTicketItem_.isCapabilityAvailable() &&
!this.collapseContent);
}
@@ -321,7 +321,7 @@ cr.define('print_preview', function() {
* @private
*/
onDuplexChange_: function() {
- this.duplexCheckbox_.checked = this.duplexTicketItem_.getValue();
+ this.duplexCheckbox_.checked = !!this.duplexTicketItem_.getValue();
this.updateUiStateInternal();
},
@@ -331,7 +331,7 @@ cr.define('print_preview', function() {
* @private
*/
onFitToPageChange_: function() {
- this.fitToPageCheckbox_.checked = this.fitToPageTicketItem_.getValue();
+ this.fitToPageCheckbox_.checked = !!this.fitToPageTicketItem_.getValue();
this.updateUiStateInternal();
},
@@ -342,7 +342,7 @@ cr.define('print_preview', function() {
*/
onCssBackgroundChange_: function() {
this.cssBackgroundCheckbox_.checked =
- this.cssBackgroundTicketItem_.getValue();
+ !!this.cssBackgroundTicketItem_.getValue();
this.updateUiStateInternal();
},
@@ -353,7 +353,7 @@ cr.define('print_preview', function() {
*/
onSelectionOnlyChange_: function() {
this.selectionOnlyCheckbox_.checked =
- this.selectionOnlyTicketItem_.getValue();
+ !!this.selectionOnlyTicketItem_.getValue();
this.updateUiStateInternal();
},
@@ -364,7 +364,7 @@ cr.define('print_preview', function() {
*/
onHeaderFooterChange_: function() {
this.headerFooterCheckbox_.checked =
- this.headerFooterTicketItem_.getValue();
+ !!this.headerFooterTicketItem_.getValue();
this.updateUiStateInternal();
}
};

Powered by Google App Engine
This is Rietveld 408576698