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

Unified Diff: tracing/tracing/ui/base/elided_cache.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/base/dropdown.html ('k') | tracing/tracing/ui/base/event_presenter.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/base/elided_cache.html
diff --git a/tracing/tracing/ui/base/elided_cache.html b/tracing/tracing/ui/base/elided_cache.html
index 23d3632f783bd1a237b50e4fce0dde61a25b1119..a7a291e719fdc9401fb5109a7a4e1721af425cd8 100644
--- a/tracing/tracing/ui/base/elided_cache.html
+++ b/tracing/tracing/ui/base/elided_cache.html
@@ -62,14 +62,14 @@ tr.exportTo('tr.ui.b', function() {
var newtitle = title;
var elided = false;
while (this.labelWidthWorld(ctx, newtitle, pixWidth) > sliceDuration) {
- if (newtitle.length * 0.75 < 1)
- break;
+ if (newtitle.length * 0.75 < 1) break;
newtitle = newtitle.substring(0, newtitle.length * 0.75);
elided = true;
}
- if (elided && newtitle.length > 3)
+ if (elided && newtitle.length > 3) {
newtitle = newtitle.substring(0, newtitle.length - 3) + '...';
+ }
stringWidthPair = new ElidedStringWidthPair(
newtitle, this.labelWidth(ctx, newtitle));
« no previous file with comments | « tracing/tracing/ui/base/dropdown.html ('k') | tracing/tracing/ui/base/event_presenter.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698