| Index: chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js
|
| diff --git a/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js b/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js
|
| index 089b77a70448aa673f88856568f61d8133d988f2..35e8fe5ac46996cf00627ee1ab34dbc8a949a88b 100644
|
| --- a/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js
|
| +++ b/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js
|
| @@ -151,13 +151,15 @@ cr.define('bmm', function() {
|
| cr.dispatchSimpleEvent(this, 'load');
|
|
|
| // Use the same histogram configuration as UMA_HISTOGRAM_COUNTS_1000().
|
| - chrome.metricsPrivate.recordValue({
|
| - 'metricName': 'Bookmarks.BookmarksInFolder',
|
| - 'type': chrome.metricsPrivate.MetricTypeType.HISTOGRAM_LOG,
|
| - 'min': 1,
|
| - 'max': 1000,
|
| - 'buckets': 50
|
| - }, this.dataModel.length);
|
| + chrome.metricsPrivate.recordValue(
|
| + {
|
| + 'metricName': 'Bookmarks.BookmarksInFolder',
|
| + 'type': chrome.metricsPrivate.MetricTypeType.HISTOGRAM_LOG,
|
| + 'min': 1,
|
| + 'max': 1000,
|
| + 'buckets': 50
|
| + },
|
| + this.dataModel.length);
|
| },
|
|
|
| /**
|
| @@ -203,8 +205,7 @@ cr.define('bmm', function() {
|
| el = el.parentNode;
|
| }
|
|
|
| - if (el && el.parentNode == this &&
|
| - !el.editing &&
|
| + if (el && el.parentNode == this && !el.editing &&
|
| !(el.lastChild instanceof ContextMenuButton)) {
|
| el.appendChild(new ContextMenuButton);
|
| }
|
| @@ -231,7 +232,7 @@ cr.define('bmm', function() {
|
| * @param {!Event} e The mousedown event object.
|
| */
|
| handleMouseDown_: function(e) {
|
| - e = /** @type {!MouseEvent} */(e);
|
| + e = /** @type {!MouseEvent} */ (e);
|
| if (e.button == 1) {
|
| // WebKit no longer fires click events for middle clicks so we manually
|
| // listen to mouse up to dispatch a click event.
|
| @@ -254,7 +255,7 @@ cr.define('bmm', function() {
|
| * @param {!Event} e The mouse up event object.
|
| */
|
| handleMiddleMouseUp_: function(e) {
|
| - e = /** @type {!MouseEvent} */(e);
|
| + e = /** @type {!MouseEvent} */ (e);
|
| this.removeEventListener('mouseup', this.handleMiddleMouseUp_);
|
| if (e.button == 1) {
|
| var el = e.target;
|
| @@ -317,7 +318,6 @@ cr.define('bmm', function() {
|
| handleMoved: function(id, moveInfo) {
|
| if (moveInfo.parentId == this.parentId ||
|
| moveInfo.oldParentId == this.parentId) {
|
| -
|
| var dataModel = this.dataModel;
|
|
|
| if (moveInfo.oldParentId == moveInfo.parentId) {
|
| @@ -369,7 +369,7 @@ cr.define('bmm', function() {
|
|
|
| // The width of the list is wrong after its content has changed.
|
| // Fortunately the reported offsetWidth is correct so we can detect the
|
| - //incorrect width.
|
| + // incorrect width.
|
| if (list.offsetWidth != list.parentNode.clientWidth - list.offsetLeft) {
|
| // Set the width to the correct size. This causes the relayout.
|
| list.style.width = list.parentNode.clientWidth - list.offsetLeft + 'px';
|
| @@ -385,10 +385,9 @@ cr.define('bmm', function() {
|
| /**
|
| * The ID of the bookmark folder we are displaying.
|
| */
|
| - cr.defineProperty(BookmarkList, 'parentId', cr.PropertyKind.JS,
|
| - function() {
|
| - this.reload();
|
| - });
|
| + cr.defineProperty(BookmarkList, 'parentId', cr.PropertyKind.JS, function() {
|
| + this.reload();
|
| + });
|
|
|
| /**
|
| * The contextMenu property.
|
| @@ -446,9 +445,8 @@ cr.define('bmm', function() {
|
| this.className = 'folder';
|
| // TODO(pkasting): Condense folder icon resources together.
|
| labelImg.style.content = cr.icon.getImage(
|
| - cr.isMac ?
|
| - 'chrome://theme/IDR_BOOKMARK_BAR_FOLDER' :
|
| - 'chrome://theme/IDR_FOLDER_CLOSED');
|
| + cr.isMac ? 'chrome://theme/IDR_BOOKMARK_BAR_FOLDER' :
|
| + 'chrome://theme/IDR_FOLDER_CLOSED');
|
| } else {
|
| labelImg.style.content = cr.icon.getFavicon(bookmarkNode.url);
|
| urlEl.textContent = bookmarkNode.url;
|
| @@ -559,14 +557,14 @@ cr.define('bmm', function() {
|
| this.setAttribute('editing', '');
|
| this.draggable = false;
|
|
|
| - labelInput = /** @type {HTMLElement} */(doc.createElement('input'));
|
| + labelInput = /** @type {HTMLElement} */ (doc.createElement('input'));
|
| labelInput.placeholder =
|
| loadTimeData.getString('name_input_placeholder');
|
| replaceAllChildren(labelTextEl, labelInput);
|
| labelInput.value = title;
|
|
|
| if (!isFolder) {
|
| - urlInput = /** @type {HTMLElement} */(doc.createElement('input'));
|
| + urlInput = /** @type {HTMLElement} */ (doc.createElement('input'));
|
| urlInput.type = 'url';
|
| urlInput.required = true;
|
| urlInput.placeholder =
|
| @@ -653,6 +651,6 @@ cr.define('bmm', function() {
|
|
|
| return {
|
| BookmarkList: BookmarkList,
|
| - list: /** @type {Element} */(null), // Set when decorated.
|
| + list: /** @type {Element} */ (null), // Set when decorated.
|
| };
|
| });
|
|
|