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(); |