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: tracing/tracing/ui/base/mouse_mode_icon.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 9 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 | « tracing/tracing/ui/base/list_view.html ('k') | tracing/tracing/ui/base/mouse_mode_selector.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/base/mouse_mode_icon.html
diff --git a/tracing/tracing/ui/base/mouse_mode_icon.html b/tracing/tracing/ui/base/mouse_mode_icon.html
index f400a99656ee9bd4679b48305244b1c68e54fe67..bb5df7173a3202bf438e10eafd6c8efb738bb884 100644
--- a/tracing/tracing/ui/base/mouse_mode_icon.html
+++ b/tracing/tracing/ui/base/mouse_mode_icon.html
@@ -56,8 +56,9 @@ Polymer({
function(modeName, candidateMode) {
return candidateMode === mode;
});
- if (modeName === undefined)
+ if (modeName === undefined) {
throw new Error('Unknown mode');
+ }
this.modeName = modeName;
},
@@ -71,10 +72,11 @@ Polymer({
set active(active) {
this.active_ = !!active;
- if (this.active_)
+ if (this.active_) {
Polymer.dom(this).classList.add('active');
- else
+ } else {
Polymer.dom(this).classList.remove('active');
+ }
this.updateContents_();
},
@@ -88,27 +90,30 @@ Polymer({
},
updateContents_: function() {
- if (this.modeName === undefined)
- return;
+ if (this.modeName === undefined) return;
var mode = this.mode;
- if (mode === undefined)
+ if (mode === undefined) {
throw new Error('Invalid mode');
+ }
var modeInfo = tr.ui.b.MOUSE_SELECTOR_MODE_INFOS[mode];
- if (!modeInfo)
+ if (!modeInfo) {
throw new Error('Invalid mode');
+ }
var title = modeInfo.title;
- if (this.acceleratorKey_)
+ if (this.acceleratorKey_) {
title = title + ' (' + this.acceleratorKey_ + ')';
+ }
this.title = title;
var bp;
- if (this.active_)
+ if (this.active_) {
bp = modeInfo.activeBackgroundPosition;
- else
+ } else {
bp = modeInfo.defaultBackgroundPosition;
+ }
this.style.backgroundPosition = bp;
}
});
« no previous file with comments | « tracing/tracing/ui/base/list_view.html ('k') | tracing/tracing/ui/base/mouse_mode_selector.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698