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

Unified Diff: tracing/tracing/ui/tracks/rect_track.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: Fix test 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
Index: tracing/tracing/ui/tracks/rect_track.html
diff --git a/tracing/tracing/ui/tracks/rect_track.html b/tracing/tracing/ui/tracks/rect_track.html
index 6a2a3c04797fa6267b6b901f8818c7f9fc0f4406..9053f4c73ab37c73399a8a207d4e05dc9e5d6445 100644
--- a/tracing/tracing/ui/tracks/rect_track.html
+++ b/tracing/tracing/ui/tracks/rect_track.html
@@ -122,8 +122,7 @@ tr.exportTo('tr.ui.tracks', function() {
this.asyncStyle_);
ctx.restore();
- if (bounds.height <= 6)
- return;
+ if (bounds.height <= 6) return;
var fontSize;
var yOffset;
@@ -146,8 +145,9 @@ tr.exportTo('tr.ui.tracks', function() {
},
addEventsToTrackMap: function(eventToTrackMap) {
- if (this.rects_ === undefined || this.rects_ === null)
+ if (this.rects_ === undefined || this.rects_ === null) {
return;
+ }
this.rects_.forEach(function(rect) {
rect.addToTrackMap(eventToTrackMap, this);
@@ -186,12 +186,10 @@ tr.exportTo('tr.ui.tracks', function() {
var index = tr.b.findFirstIndexInArray(this.rects_, function(rect) {
return rect.modelItem === event;
});
- if (index === -1)
- return false;
+ if (index === -1) return false;
var newIndex = index + offset;
- if (newIndex < 0 || newIndex >= this.rects_.length)
- return false;
+ if (newIndex < 0 || newIndex >= this.rects_.length) return false;
this.rects_[newIndex].addToSelection(selection);
return true;
@@ -203,10 +201,11 @@ tr.exportTo('tr.ui.tracks', function() {
// we should probably add an addToSelectionIfMatching(selection, filter)
// method to SelectableItem (#900).
var modelItem = this.rects_[i].modelItem;
- if (!modelItem)
- continue;
- if (filter.matchSlice(modelItem))
+ if (!modelItem) continue;
+
+ if (filter.matchSlice(modelItem)) {
selection.push(modelItem);
+ }
}
},
@@ -219,8 +218,7 @@ tr.exportTo('tr.ui.tracks', function() {
worldX,
worldMaxDist);
- if (!rect)
- return;
+ if (!rect) return;
rect.addToSelection(selection);
}

Powered by Google App Engine
This is Rietveld 408576698