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

Unified Diff: tracing/tracing/ui/base/dropdown.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/draw_helpers.html ('k') | tracing/tracing/ui/base/elided_cache.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/base/dropdown.html
diff --git a/tracing/tracing/ui/base/dropdown.html b/tracing/tracing/ui/base/dropdown.html
index 5c2f4dfe170a93e5a61bf150611ab957c8d7ea68..58af6e2a3d4a6c3d903913df016b1e6114761015 100644
--- a/tracing/tracing/ui/base/dropdown.html
+++ b/tracing/tracing/ui/base/dropdown.html
@@ -100,23 +100,22 @@ Polymer({
inside &= e.clientX < or.right;
inside &= e.clientY >= or.top;
inside &= e.clientY < or.bottom;
- if (!inside)
- return;
+ if (!inside) return;
e.preventDefault();
this.toggle_();
},
toggle_: function() {
- if (!this.isOpen)
+ if (!this.isOpen) {
this.show();
- else
+ } else {
this.close();
+ }
},
show: function() {
- if (this.isOpen)
- return;
+ if (this.isOpen) return;
Polymer.dom(this.$.outer).classList.add('open');
@@ -132,10 +131,8 @@ Polymer({
},
onDialogClick_: function(e) {
- if (!this.isOpen)
- return;
- if (e.srcElement !== this.$.dialog)
- return;
+ if (!this.isOpen) return;
+ if (e.srcElement !== this.$.dialog) return;
e.preventDefault();
this.close();
},
@@ -146,8 +143,7 @@ Polymer({
},
close: function() {
- if (!this.isOpen)
- return;
+ if (!this.isOpen) return;
this.$.dialog.close();
Polymer.dom(this.$.outer).classList.remove('open');
this.$.outer.focus();
« no previous file with comments | « tracing/tracing/ui/base/draw_helpers.html ('k') | tracing/tracing/ui/base/elided_cache.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698