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

Unified Diff: chrome/browser/resources/print_preview/previewarea/margin_control.js

Issue 2865633004: Fix all remaining print preview closure compiler errors (Closed)
Patch Set: Fix small issues Created 3 years, 7 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/previewarea/margin_control.js
diff --git a/chrome/browser/resources/print_preview/previewarea/margin_control.js b/chrome/browser/resources/print_preview/previewarea/margin_control.js
index 07d2dcc6ad8f75d7a99a814c7cfd5e231d8906a1..d81c74242fcf133dc650e318f48368133e4e2d63 100644
--- a/chrome/browser/resources/print_preview/previewarea/margin_control.js
+++ b/chrome/browser/resources/print_preview/previewarea/margin_control.js
@@ -99,7 +99,7 @@ cr.define('print_preview', function() {
* @private
*/
this.isInError_ = false;
- };
+ }
/**
* Event types dispatched by the margin control.
@@ -327,13 +327,15 @@ cr.define('print_preview', function() {
this.getElement(),
'transitionend',
this.onTransitionEnd_.bind(this));
- this.tracker.add(
- this.textbox_, 'input', this.onTextboxInput_.bind(this));
- this.tracker.add(
- this.textbox_, 'keydown', this.onTextboxKeyDown_.bind(this));
- this.tracker.add(
- this.textbox_, 'focus', this.setIsFocused_.bind(this, true));
- this.tracker.add(this.textbox_, 'blur', this.onTexboxBlur_.bind(this));
+ if (this.textbox_) {
dpapad 2017/05/08 20:40:10 The previous code assumed that this.textbox_ was a
rbpotter 2017/05/08 23:28:20 Done.
+ this.tracker.add(
+ this.textbox_, 'input', this.onTextboxInput_.bind(this));
+ this.tracker.add(
+ this.textbox_, 'keydown', this.onTextboxKeyDown_.bind(this));
+ this.tracker.add(
+ this.textbox_, 'focus', this.setIsFocused_.bind(this, true));
+ this.tracker.add(this.textbox_, 'blur', this.onTexboxBlur_.bind(this));
+ }
},
/** @override */

Powered by Google App Engine
This is Rietveld 408576698