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

Unified Diff: ui/webui/resources/js/cr/ui/grid.js

Issue 2603443002: Clang format JS: Disallow single line functions, conditionals, loops, and switch statements (Closed)
Patch Set: update c/b/r/ as well Created 4 years 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 | « ui/webui/resources/js/cr/ui/focus_row.js ('k') | ui/webui/resources/js/cr/ui/list.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/ui/grid.js
diff --git a/ui/webui/resources/js/cr/ui/grid.js b/ui/webui/resources/js/cr/ui/grid.js
index aa0b92887db0d333572f50aeee79105f7c313e86..a71bf6b0e963c8e347e66691235589053d880ad9 100644
--- a/ui/webui/resources/js/cr/ui/grid.js
+++ b/ui/webui/resources/js/cr/ui/grid.js
@@ -73,7 +73,9 @@ cr.define('cr.ui', function() {
* Shows a warning at the setter because cr.ui.Grid does not support this.
* @type {boolean}
*/
- get fixedHeight() { return true; },
+ get fixedHeight() {
+ return true;
+ },
set fixedHeight(fixedHeight) {
if (!fixedHeight)
console.warn('cr.ui.Grid does not support fixedHeight = false');
@@ -206,14 +208,18 @@ cr.define('cr.ui', function() {
* of multiple columns.
* @override
*/
- getItemRow: function(index) { return Math.floor(index / this.columns); },
+ getItemRow: function(index) {
+ return Math.floor(index / this.columns);
+ },
/**
* @param {number} row The row.
* @return {number} The index of the first item in the row.
* @override
*/
- getFirstItemInRow: function(row) { return row * this.columns; },
+ getFirstItemInRow: function(row) {
+ return row * this.columns;
+ },
/**
* Creates the selection controller to use internally.
@@ -404,7 +410,9 @@ cr.define('cr.ui', function() {
* @return {number} The index before or -1 if not found.
* @override
*/
- getIndexBefore: function(index) { return index - 1; },
+ getIndexBefore: function(index) {
+ return index - 1;
+ },
/**
* Returns the index after (x axis) the given element.
« no previous file with comments | « ui/webui/resources/js/cr/ui/focus_row.js ('k') | ui/webui/resources/js/cr/ui/list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698