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

Unified Diff: tracing/tracing/ui/extras/chrome/cc/selection.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/chrome/cc/selection.html
diff --git a/tracing/tracing/ui/extras/chrome/cc/selection.html b/tracing/tracing/ui/extras/chrome/cc/selection.html
index 1a1517198948316c5a04b64509ecf793d8ac1f0c..159fc2d65379ed70c4cf79389efad97e81d38f59 100644
--- a/tracing/tracing/ui/extras/chrome/cc/selection.html
+++ b/tracing/tracing/ui/extras/chrome/cc/selection.html
@@ -69,8 +69,9 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
* @constructor
*/
function RenderPassSelection(renderPass, renderPassId) {
- if (!renderPass || (renderPassId === undefined))
+ if (!renderPass || (renderPassId === undefined)) {
throw new Error('Render pass (with id) is required');
+ }
this.renderPass_ = renderPass;
this.renderPassId_ = renderPassId;
}
@@ -111,8 +112,9 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
* @constructor
*/
function LayerSelection(layer) {
- if (!layer)
+ if (!layer) {
throw new Error('Layer is required');
+ }
this.layer_ = layer;
}
@@ -139,8 +141,9 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
var dataView = document.createElement(
'tr-ui-a-generic-object-view-with-label');
dataView.label = 'Layer ' + this.layer_.layerId;
- if (this.layer_.usingGpuRasterization)
+ if (this.layer_.usingGpuRasterization) {
dataView.label += ' (GPU-rasterized)';
+ }
dataView.object = this.layer_.args;
return dataView;
},
@@ -152,8 +155,7 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
findEquivalent: function(lthi) {
var layer = lthi.activeTree.findLayerWithId(this.layer_.layerId) ||
lthi.pendingTree.findLayerWithId(this.layer_.layerId);
- if (!layer)
- return undefined;
+ if (!layer) return undefined;
return new LayerSelection(layer);
}
};
@@ -207,11 +209,11 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
findEquivalent: function(lthi) {
var tileInstance = this.tile_.tileInstance;
if (lthi.ts < tileInstance.creationTs ||
- lthi.ts >= tileInstance.deletionTs)
+ lthi.ts >= tileInstance.deletionTs) {
return undefined;
+ }
var tileSnapshot = tileInstance.getSnapshotAt(lthi.ts);
- if (!tileSnapshot)
- return undefined;
+ if (!tileSnapshot) return undefined;
return new TileSelection(tileSnapshot);
}
};
« no previous file with comments | « tracing/tracing/ui/extras/chrome/cc/raster_task_view.html ('k') | tracing/tracing/ui/extras/chrome/cc/tile_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698