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

Unified Diff: tracing/tracing/ui/tracks/slice_group_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/rect_track.html ('k') | tracing/tracing/ui/tracks/stacked_bars_track.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/tracks/slice_group_track.html
diff --git a/tracing/tracing/ui/tracks/slice_group_track.html b/tracing/tracing/ui/tracks/slice_group_track.html
index 6f238afe1fdf0ad2df2ededa4ce7162e85e1c84c..6d8665290cfa9f176f9dac37de397cdd1d9c022d 100644
--- a/tracing/tracing/ui/tracks/slice_group_track.html
+++ b/tracing/tracing/ui/tracks/slice_group_track.html
@@ -97,22 +97,21 @@ tr.exportTo('tr.ui.tracks', function() {
// 0: [ a ] [f]
// 1: [ b ][e]
// 2: [c][d]
- if (!slices.length)
- return [];
+ if (!slices.length) return [];
var ops = [];
for (var i = 0; i < slices.length; i++) {
- if (slices[i].subSlices)
+ if (slices[i].subSlices) {
slices[i].subSlices.splice(0,
slices[i].subSlices.length);
+ }
ops.push(i);
}
ops.sort(function(ix, iy) {
var x = slices[ix];
var y = slices[iy];
- if (x.start !== y.start)
- return x.start - y.start;
+ if (x.start !== y.start) return x.start - y.start;
// Elements get inserted into the slices array in order of when the
// slices start. Because slices must be properly nested, we break
@@ -131,8 +130,7 @@ tr.exportTo('tr.ui.tracks', function() {
// Try to fit the slice into the existing subrows.
var inserted = false;
for (var j = subRows.length - 1; j >= 0; j--) {
- if (subRows[j].length === 0)
- continue;
+ if (subRows[j].length === 0) continue;
var insertedSlice = subRows[j][subRows[j].length - 1];
if (slice.start < insertedSlice.start) {
@@ -141,17 +139,18 @@ tr.exportTo('tr.ui.tracks', function() {
}
if (insertedSlice.bounds(slice, precisionUnit)) {
// Insert it into subRow j + 1.
- while (subRows.length <= j + 1)
+ while (subRows.length <= j + 1) {
subRows.push([]);
+ }
subRows[j + 1].push(slice);
- if (insertedSlice.subSlices)
+ if (insertedSlice.subSlices) {
insertedSlice.subSlices.push(slice);
+ }
inserted = true;
break;
}
}
- if (inserted)
- continue;
+ if (inserted) continue;
// Append it to subRow[0] as a root.
subRows[0].push(slice);
« no previous file with comments | « tracing/tracing/ui/tracks/rect_track.html ('k') | tracing/tracing/ui/tracks/stacked_bars_track.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698