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

Unified Diff: chrome/browser/resources/local_ntp/instant_iframe_validation.js

Issue 2600683002: Run tools/clang-format-js on some of chrome/browser/resources/ (Closed)
Patch Set: hackhackhack Created 3 years, 11 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: chrome/browser/resources/local_ntp/instant_iframe_validation.js
diff --git a/chrome/browser/resources/local_ntp/instant_iframe_validation.js b/chrome/browser/resources/local_ntp/instant_iframe_validation.js
index 822350da69c2c5f2f5f7ddad86a7f45fe7f706b9..a557dc6a9c80a5205503ff2d9ecef212f1e8a95d 100644
--- a/chrome/browser/resources/local_ntp/instant_iframe_validation.js
+++ b/chrome/browser/resources/local_ntp/instant_iframe_validation.js
@@ -16,8 +16,8 @@
function convertToHexColor(color) {
// Color must be a number, finite, with no fractional part, in the correct
// range for an RGB hex color.
- if (isFinite(color) && Math.floor(color) == color &&
- color >= 0 && color <= 0xffffff) {
+ if (isFinite(color) && Math.floor(color) == color && color >= 0 &&
+ color <= 0xffffff) {
var hexColor = color.toString(16);
// Pads with initial zeros and # (e.g. for 'ff' yields '#0000ff').
return '#000000'.substr(0, 7 - hexColor.length) + hexColor;
@@ -48,11 +48,8 @@ function convertArrayToRGBAColor(rgbaColor) {
isValidRBGAComponent(rgbaColor[1]) &&
isValidRBGAComponent(rgbaColor[2]) &&
isValidRBGAComponent(rgbaColor[3])) {
- return 'rgba(' +
- rgbaColor[0] + ',' +
- rgbaColor[1] + ',' +
- rgbaColor[2] + ',' +
- rgbaColor[3] / 255 + ')';
+ return 'rgba(' + rgbaColor[0] + ',' + rgbaColor[1] + ',' + rgbaColor[2] +
+ ',' + rgbaColor[3] / 255 + ')';
}
return null;
}

Powered by Google App Engine
This is Rietveld 408576698