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

Unified Diff: ui/webui/resources/js/cr/ui/table.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/splitter.js ('k') | ui/webui/resources/js/cr/ui/table/table_column.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/table.js
diff --git a/ui/webui/resources/js/cr/ui/table.js b/ui/webui/resources/js/cr/ui/table.js
index fed8ea7eb4b85293b534d811e9eb730ccf59f403..9e28e4c752e2361270ae2a7e037db70ffea79ea0 100644
--- a/ui/webui/resources/js/cr/ui/table.js
+++ b/ui/webui/resources/js/cr/ui/table.js
@@ -32,7 +32,9 @@ cr.define('cr.ui', function() {
*
* @type {cr.ui.ArrayDataModel}
*/
- get dataModel() { return this.list_.dataModel; },
+ get dataModel() {
+ return this.list_.dataModel;
+ },
set dataModel(dataModel) {
if (this.list_.dataModel != dataModel) {
if (this.list_.dataModel) {
@@ -61,14 +63,18 @@ cr.define('cr.ui', function() {
*
* @type {cr.ui.List}
*/
- get list() { return this.list_; },
+ get list() {
+ return this.list_;
+ },
/**
* The table column model.
*
* @type {cr.ui.table.TableColumnModel}
*/
- get columnModel() { return this.columnModel_; },
+ get columnModel() {
+ return this.columnModel_;
+ },
set columnModel(columnModel) {
if (this.columnModel_ != columnModel) {
if (this.columnModel_)
@@ -88,7 +94,9 @@ cr.define('cr.ui', function() {
* @type
* {cr.ui.ListSelectionModel|cr.ui.ListSingleSelectionModel}
*/
- get selectionModel() { return this.list_.selectionModel; },
+ get selectionModel() {
+ return this.list_.selectionModel;
+ },
set selectionModel(selectionModel) {
if (this.list_.selectionModel != selectionModel) {
if (this.dataModel)
@@ -102,17 +110,27 @@ cr.define('cr.ui', function() {
*
* @type {boolean}
*/
- get autoExpands() { return this.list_.autoExpands; },
- set autoExpands(autoExpands) { this.list_.autoExpands = autoExpands; },
+ get autoExpands() {
+ return this.list_.autoExpands;
+ },
+ set autoExpands(autoExpands) {
+ this.list_.autoExpands = autoExpands;
+ },
- get fixedHeight() { return this.list_.fixedHeight; },
- set fixedHeight(fixedHeight) { this.list_.fixedHeight = fixedHeight; },
+ get fixedHeight() {
+ return this.list_.fixedHeight;
+ },
+ set fixedHeight(fixedHeight) {
+ this.list_.fixedHeight = fixedHeight;
+ },
/**
* Returns render function for row.
* @return {function(*, cr.ui.Table): HTMLElement} Render function.
*/
- getRenderFunction: function() { return this.list_.renderFunction_; },
+ getRenderFunction: function() {
+ return this.list_.renderFunction_;
+ },
/**
* Sets render function for row.
@@ -132,7 +150,9 @@ cr.define('cr.ui', function() {
*
* @type {cr.ui.table.TableColumnModel}
*/
- get header() { return this.header_; },
+ get header() {
+ return this.header_;
+ },
/**
* Initializes the element.
@@ -199,7 +219,9 @@ cr.define('cr.ui', function() {
* Ensures that a given index is inside the viewport.
* @param {number} i The index of the item to scroll into view.
*/
- scrollIndexIntoView: function(i) { this.list_.scrollIndexIntoView(i); },
+ scrollIndexIntoView: function(i) {
+ this.list_.scrollIndexIntoView(i);
+ },
/**
* Find the list item element at the given index.
@@ -215,7 +237,9 @@ cr.define('cr.ui', function() {
* After sorting we need to redraw header
* @param {Event} e The 'sorted' event.
*/
- handleSorted_: function(e) { this.header_.redraw(); },
+ handleSorted_: function(e) {
+ this.header_.redraw();
+ },
/**
* This handles data model 'change' and 'splice' events.
« no previous file with comments | « ui/webui/resources/js/cr/ui/splitter.js ('k') | ui/webui/resources/js/cr/ui/table/table_column.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698