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

Unified Diff: tracing/tracing/ui/tracks/async_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/timeline_viewport.html ('k') | tracing/tracing/ui/tracks/chart_series.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/tracks/async_slice_group_track.html
diff --git a/tracing/tracing/ui/tracks/async_slice_group_track.html b/tracing/tracing/ui/tracks/async_slice_group_track.html
index 2aa13823faa58b142a03e1150da0c4b5c83b0b74..a3f5f3135ff0604c5031be5c35ae9a4a71e69286 100644
--- a/tracing/tracing/ui/tracks/async_slice_group_track.html
+++ b/tracing/tracing/ui/tracks/async_slice_group_track.html
@@ -78,8 +78,9 @@ tr.exportTo('tr.ui.tracks', function() {
// Helper function that returns true if it can put the slice on row n.
var findLevel = function(sliceToPut, rows, n) {
- if (n >= rows.length)
+ if (n >= rows.length) {
return true; // We always can make empty rows to put the slice.
+ }
var subRow = rows[n];
var lastSliceInSubRow = subRow[subRow.length - 1];
if (sliceToPut.start >= lastSliceInSubRow.end) {
@@ -89,8 +90,9 @@ tr.exportTo('tr.ui.tracks', function() {
}
// Make sure nested sub slices can be fitted in as well.
for (var subSlice of sliceToPut.subSlices) {
- if (!findLevel(subSlice, rows, n + 1))
+ if (!findLevel(subSlice, rows, n + 1)) {
return false;
+ }
}
return true;
}
@@ -108,16 +110,19 @@ tr.exportTo('tr.ui.tracks', function() {
break;
}
}
- if (!found)
+ if (!found) {
subRows.push([]);
+ }
subRows[index].push(slice);
// Fit subSlices recursively into rows below parent.
var fitSubSlicesRecursively = function(subSlices, level, rows) {
- if (subSlices === undefined || subSlices.length === 0)
+ if (subSlices === undefined || subSlices.length === 0) {
return;
- if (level === rows.length)
+ }
+ if (level === rows.length) {
rows.push([]);
+ }
for (var subSlice of subSlices) {
rows[level].push(subSlice);
fitSubSlicesRecursively(subSlice.subSlices, level + 1, rows);
« no previous file with comments | « tracing/tracing/ui/timeline_viewport.html ('k') | tracing/tracing/ui/tracks/chart_series.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698