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

Side by Side Diff: ui/webui/resources/js/cr/ui/tabs.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 3 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('cr.ui', function() { 5 cr.define('cr.ui', function() {
6 6
7 /** 7 /**
8 * Returns the TabBox for a Tab or a TabPanel. 8 * Returns the TabBox for a Tab or a TabPanel.
9 * @param {Tab|TabPanel} el The tab or tabpanel element. 9 * @param {Tab|TabPanel} el The tab or tabpanel element.
10 * @return {TabBox} The tab box if found. 10 * @return {TabBox} The tab box if found.
11 */ 11 */
12 function getTabBox(el) { 12 function getTabBox(el) {
13 return findAncestor( 13 return findAncestor(el, function(node) {
14 el, function(node) { return node.tagName == 'TABBOX'; }); 14 return node.tagName == 'TABBOX';
15 });
15 } 16 }
16 17
17 /** 18 /**
18 * Returns whether an element is a tab related object. 19 * Returns whether an element is a tab related object.
19 * @param {HTMLElement} el The element whose tag is being checked 20 * @param {HTMLElement} el The element whose tag is being checked
20 * @return {boolean} Whether the element is a tab related element. 21 * @return {boolean} Whether the element is a tab related element.
21 */ 22 */
22 function isTabElement(el) { 23 function isTabElement(el) {
23 return el.tagName == 'TAB' || el.tagName == 'TABPANEL'; 24 return el.tagName == 'TAB' || el.tagName == 'TABPANEL';
24 } 25 }
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 cr.defineProperty(TabPanel, 'selected', cr.PropertyKind.BOOL_ATTR); 232 cr.defineProperty(TabPanel, 'selected', cr.PropertyKind.BOOL_ATTR);
232 233
233 return { 234 return {
234 TabBox: TabBox, 235 TabBox: TabBox,
235 Tabs: Tabs, 236 Tabs: Tabs,
236 Tab: Tab, 237 Tab: Tab,
237 TabPanels: TabPanels, 238 TabPanels: TabPanels,
238 TabPanel: TabPanel 239 TabPanel: TabPanel
239 }; 240 };
240 }); 241 });
OLDNEW
« no previous file with comments | « ui/webui/resources/js/cr/ui/table/table_header.js ('k') | ui/webui/resources/js/cr/ui/touch_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698