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

Unified Diff: chrome/browser/resources/options/inline_editable_list.js

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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/options/inline_editable_list.js
diff --git a/chrome/browser/resources/options/inline_editable_list.js b/chrome/browser/resources/options/inline_editable_list.js
index da5751e2719efb9eba3f2f007d01885ae0690c4c..74361d3d63b6afee113feb03884389222c42a502 100644
--- a/chrome/browser/resources/options/inline_editable_list.js
+++ b/chrome/browser/resources/options/inline_editable_list.js
@@ -322,8 +322,8 @@ cr.define('options', function() {
* @private
*/
createEditableTextCell: function(text) {
- var container = /** @type {HTMLElement} */(
- this.ownerDocument.createElement('div'));
+ var container =
+ /** @type {HTMLElement} */ (this.ownerDocument.createElement('div'));
var textEl = null;
if (!this.isPlaceholder) {
textEl = this.ownerDocument.createElement('div');
@@ -370,8 +370,8 @@ cr.define('options', function() {
if (this.editable)
control.staticVersion.tabIndex = -1;
control.staticVersion.editableVersion = control;
- control.staticVersion.addEventListener('focus',
- this.handleFocus.bind(this));
+ control.staticVersion.addEventListener(
+ 'focus', this.handleFocus.bind(this));
}
this.editFields_.push(control);
},
@@ -409,7 +409,7 @@ cr.define('options', function() {
if (editFields[i].tagName == 'INPUT') {
editFields[i].value =
- this.isPlaceholder ? '' : staticLabel.textContent;
+ this.isPlaceholder ? '' : staticLabel.textContent;
}
// Add more tag types here as new createEditable* methods are added.
@@ -443,8 +443,8 @@ cr.define('options', function() {
* @private
*/
getFocusedColumnIndex_: function() {
- var element = document.activeElement.editableVersion ||
- document.activeElement;
+ var element =
+ document.activeElement.editableVersion || document.activeElement;
if (element.hasAttribute('inlineeditable-column'))
return parseInt(element.getAttribute('inlineeditable-column'), 10);
@@ -548,7 +548,8 @@ cr.define('options', function() {
handleFocusIn_: function(e) {
var target = e.target.editableVersion || e.target;
this.focusedColumnIndex = target.hasAttribute('inlineeditable-column') ?
- parseInt(target.getAttribute('inlineeditable-column'), 10) : -1;
+ parseInt(target.getAttribute('inlineeditable-column'), 10) :
+ -1;
},
};
@@ -596,8 +597,8 @@ cr.define('options', function() {
decorate: function() {
DeletableItemList.prototype.decorate.call(this);
this.setAttribute('inlineeditable', '');
- this.addEventListener('hasElementFocusChange',
- this.handleListFocusChange_);
+ this.addEventListener(
+ 'hasElementFocusChange', this.handleListFocusChange_);
// <list> isn't focusable by default, but cr.ui.List defaults tabindex to
// 0 if it's not set.
this.tabIndex = -1;
@@ -696,7 +697,7 @@ cr.define('options', function() {
selectIndexWithoutFocusing: function(index) {
// Remove focusability from old item.
var oldItem = this.getListItemByIndex(this.selectionModel.leadIndex) ||
- this.getInitialFocusableItem();
+ this.getInitialFocusableItem();
if (oldItem) {
oldItem.setEditableValuesFocusable(false);
oldItem.setStaticValuesFocusable(false);
@@ -756,12 +757,12 @@ cr.define('options', function() {
},
/**
- * Override to change which item is initially focusable.
- * @return {options.InlineEditableItem} Initially focusable item or null.
- * @protected
- */
+ * Override to change which item is initially focusable.
+ * @return {options.InlineEditableItem} Initially focusable item or null.
+ * @protected
+ */
getInitialFocusableItem: function() {
- return /** @type {options.InlineEditableItem} */(
+ return /** @type {options.InlineEditableItem} */ (
this.getListItemByIndex(0));
},
};

Powered by Google App Engine
This is Rietveld 408576698