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

Unified Diff: ui/webui/resources/js/cr/ui/focus_outline_manager.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_manager.js ('k') | ui/webui/resources/js/cr/ui/focus_row.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/focus_outline_manager.js
diff --git a/ui/webui/resources/js/cr/ui/focus_outline_manager.js b/ui/webui/resources/js/cr/ui/focus_outline_manager.js
index 8ca4f92334798c21d163dbd1d8be8f6aaf73b498..23ef15203c1e83a9d7cda9daf8358a66ad076151 100644
--- a/ui/webui/resources/js/cr/ui/focus_outline_manager.js
+++ b/ui/webui/resources/js/cr/ui/focus_outline_manager.js
@@ -31,11 +31,13 @@ cr.define('cr.ui', function() {
var self = this;
- doc.addEventListener(
- 'keydown', function(e) { self.focusByKeyboard_ = true; }, true);
+ doc.addEventListener('keydown', function(e) {
+ self.focusByKeyboard_ = true;
+ }, true);
- doc.addEventListener(
- 'mousedown', function(e) { self.focusByKeyboard_ = false; }, true);
+ doc.addEventListener('mousedown', function(e) {
+ self.focusByKeyboard_ = false;
+ }, true);
doc.addEventListener('focus', function(event) {
// Update visibility only when focus is actually changed.
@@ -62,14 +64,20 @@ cr.define('cr.ui', function() {
*/
focusByKeyboard_: true,
- updateVisibility: function() { this.visible = this.focusByKeyboard_; },
+ updateVisibility: function() {
+ this.visible = this.focusByKeyboard_;
+ },
/**
* Whether the focus outline should be visible.
* @type {boolean}
*/
- set visible(visible) { this.classList_.toggle(CLASS_NAME, visible); },
- get visible() { return this.classList_.contains(CLASS_NAME); }
+ set visible(visible) {
+ this.classList_.toggle(CLASS_NAME, visible);
+ },
+ get visible() {
+ return this.classList_.contains(CLASS_NAME);
+ }
};
/**
« no previous file with comments | « ui/webui/resources/js/cr/ui/focus_manager.js ('k') | ui/webui/resources/js/cr/ui/focus_row.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698