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

Unified Diff: tracing/tracing/ui/extras/deep_reports/html_results.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
Index: tracing/tracing/ui/extras/deep_reports/html_results.html
diff --git a/tracing/tracing/ui/extras/deep_reports/html_results.html b/tracing/tracing/ui/extras/deep_reports/html_results.html
index 2324a1d92149a5d3d72d708fa93d8fa12072ebd6..a14c18efcf6c1c1d399ccc3a29d7b49dd452a50f 100644
--- a/tracing/tracing/ui/extras/deep_reports/html_results.html
+++ b/tracing/tracing/ui/extras/deep_reports/html_results.html
@@ -52,15 +52,14 @@ Polymer({
},
addColumnIfNeeded_: function(columnName) {
- if (this.hasColumnNamed_[columnName])
- return;
+ if (this.hasColumnNamed_[columnName]) return;
+
this.hasColumnNamed_[columnName] = true;
var column = {
title: columnName,
value: function(row) {
- if (row[columnName] === undefined)
- return '';
+ if (row[columnName] === undefined) return '';
return row[columnName];
}
};
@@ -70,13 +69,15 @@ Polymer({
// Update widths.
var colWidthPercentage;
- if (columns.length === 1)
+ if (columns.length === 1) {
colWidthPercentage = '100%';
- else
+ } else {
colWidthPercentage = (100 / (columns.length - 1)).toFixed(3) + '%';
+ }
- for (var i = 1; i < columns.length; i++)
+ for (var i = 1; i < columns.length; i++) {
columns[i].width = colWidthPercentage;
+ }
this.$.table.tableColumns = columns;
},
@@ -107,8 +108,9 @@ Polymer({
addValue: function(value) {
/* Value is expected to be a scalar telemetry-style Value. */
- if (value.type !== 'scalar')
+ if (value.type !== 'scalar') {
throw new Error('wat');
+ }
this.addColumnIfNeeded_(value.name);
var rowForPage = this.getRowForPage_(value.page);
« no previous file with comments | « tracing/tracing/ui/extras/chrome/layout_tree_sub_view.html ('k') | tracing/tracing/ui/extras/deep_reports/scalar_value.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698