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

Unified Diff: tracing/tracing/ui/extras/chrome/cc/display_item_debugger.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/display_item_debugger.html
diff --git a/tracing/tracing/ui/extras/chrome/cc/display_item_debugger.html b/tracing/tracing/ui/extras/chrome/cc/display_item_debugger.html
index 6af80594cf9939455b05db2d06dcb4deda4eb411..0edd855d8547bf50c48ccff0e92bdfc509540619 100644
--- a/tracing/tracing/ui/extras/chrome/cc/display_item_debugger.html
+++ b/tracing/tracing/ui/extras/chrome/cc/display_item_debugger.html
@@ -261,8 +261,8 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
},
scheduleUpdateContents_: function() {
- if (this.updateContentsPending_)
- return;
+ if (this.updateContentsPending_) return;
+
this.updateContentsPending_ = true;
tr.b.requestAnimationFrameInThisFrameIfPossible(
this.updateContents_.bind(this)
@@ -279,8 +279,7 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
}
// Return if picture hasn't finished rasterizing.
- if (!this.pictureAsImageData_)
- return;
+ if (!this.pictureAsImageData_) return;
this.infoBar_.visible = false;
this.infoBar_.removeAllButtons();
@@ -301,15 +300,16 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
drawPicture_: function() {
var size = this.getRasterCanvasSize_();
- if (size.width !== this.rasterCanvas_.width)
+ if (size.width !== this.rasterCanvas_.width) {
this.rasterCanvas_.width = size.width;
- if (size.height !== this.rasterCanvas_.height)
+ }
+ if (size.height !== this.rasterCanvas_.height) {
this.rasterCanvas_.height = size.height;
+ }
this.rasterCtx_.clearRect(0, 0, size.width, size.height);
- if (!this.picture_ || !this.pictureAsImageData_.imageData)
- return;
+ if (!this.picture_ || !this.pictureAsImageData_.imageData) return;
var imgCanvas = this.pictureAsImageData_.asCanvas();
var w = imgCanvas.width;
@@ -345,11 +345,12 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
var index = Array.prototype.indexOf.call(
this.displayItemListView_.children, selected);
var displayItem = this.displayItemList_.items[index];
- if (displayItem && displayItem.skp64)
+ if (displayItem && displayItem.skp64) {
this.picture = new tr.e.cc.Picture(
displayItem.skp64, this.displayItemList_.layerRect);
- else
+ } else {
this.picture = undefined;
+ }
},
onDisplayItemInfoClick_: function(e) {
@@ -402,8 +403,7 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
},
onUpdateZoom_: function(e) {
- if (!this.isZooming_)
- return;
+ if (!this.isZooming_) return;
var currentMouseViewPos = this.extractRelativeMousePosition_(e);
@@ -433,15 +433,15 @@ tr.exportTo('tr.ui.e.chrome.cc', function() {
},
saveFile_: function(filename, rawData) {
- if (!rawData)
- return;
+ if (!rawData) return;
// Convert this String into an Uint8Array
var length = rawData.length;
var arrayBuffer = new ArrayBuffer(length);
var uint8Array = new Uint8Array(arrayBuffer);
- for (var c = 0; c < length; c++)
+ for (var c = 0; c < length; c++) {
uint8Array[c] = rawData.charCodeAt(c);
+ }
// Create a blob URL from the binary array.
var blob = new Blob([uint8Array], {type: 'application/octet-binary'});

Powered by Google App Engine
This is Rietveld 408576698