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

Unified Diff: tracing/tracing/ui/tracks/rect_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/process_track_base.html ('k') | tracing/tracing/ui/tracks/slice_group_track.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f4120a1689b5c4d870e69762a685b8384d915288..67c944771324f5a70cc2413e0ed2d13e0fed9602 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);
}
« no previous file with comments | « tracing/tracing/ui/tracks/process_track_base.html ('k') | tracing/tracing/ui/tracks/slice_group_track.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698