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

Unified Diff: tracing/tracing/ui/tracks/track.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/tracks/thread_track.html ('k') | tracing/tracing/ui/tracks/x_axis_track.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/tracks/track.html
diff --git a/tracing/tracing/ui/tracks/track.html b/tracing/tracing/ui/tracks/track.html
index 62b18a5bad65079ac70689d457f229b67d252478..bac98738d336814309bea7083b5cf3863a0ef99b 100644
--- a/tracing/tracing/ui/tracks/track.html
+++ b/tracing/tracing/ui/tracks/track.html
@@ -24,8 +24,9 @@ tr.exportTo('tr.ui.tracks', function() {
decorate: function(viewport) {
tr.ui.b.ContainerThatDecoratesItsChildren.prototype.decorate.call(this);
- if (viewport === undefined)
+ if (viewport === undefined) {
throw new Error('viewport is required when creating a Track.');
+ }
this.viewport_ = viewport;
Polymer.dom(this).classList.add('track');
@@ -38,8 +39,9 @@ tr.exportTo('tr.ui.tracks', function() {
get drawingContainer() {
var cur = this;
while (cur) {
- if (cur instanceof tr.ui.tracks.DrawingContainer)
+ if (cur instanceof tr.ui.tracks.DrawingContainer) {
return cur;
+ }
cur = cur.parentElement;
}
return undefined;
@@ -50,17 +52,17 @@ tr.exportTo('tr.ui.tracks', function() {
invalidateDrawingContainer: function() {
var dc = this.drawingContainer;
- if (dc)
- dc.invalidate();
+ if (dc) dc.invalidate();
},
context: function() {
// This is a little weird here, but we have to be able to walk up the
// parent tree to get the context.
- if (!Polymer.dom(this).parentNode)
- return undefined;
- if (!Polymer.dom(this).parentNode.context)
+ if (!Polymer.dom(this).parentNode) return undefined;
+
+ if (!Polymer.dom(this).parentNode.context) {
throw new Error('Parent container does not support context() method.');
+ }
return Polymer.dom(this).parentNode.context();
},
@@ -68,8 +70,9 @@ tr.exportTo('tr.ui.tracks', function() {
},
undecorateChild_: function(childTrack) {
- if (childTrack.detach)
+ if (childTrack.detach) {
childTrack.detach();
+ }
},
updateContents_: function() {
@@ -118,8 +121,7 @@ tr.exportTo('tr.ui.tracks', function() {
var clientRect = this.getBoundingClientRect();
var a = Math.max(loVY, clientRect.top);
var b = Math.min(hiVY, clientRect.bottom);
- if (a > b)
- return;
+ if (a > b) return;
this.addIntersectingEventsInRangeToSelectionInWorldSpace(
loWX, hiWX, viewPixWidthWorld, selection);
@@ -152,8 +154,7 @@ tr.exportTo('tr.ui.tracks', function() {
worldX,
worldMaxDist);
- if (!instantEvent)
- return;
+ if (!instantEvent) return;
selection.push(instantEvent);
}
« no previous file with comments | « tracing/tracing/ui/tracks/thread_track.html ('k') | tracing/tracing/ui/tracks/x_axis_track.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698