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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/scrollbar.js

Issue 651403002: Fix trivial type-check errors in file_manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use Node.parentElement, ensure opt_sizeStats, and edit a type annotation. Created 6 years, 2 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: ui/file_manager/file_manager/foreground/js/ui/scrollbar.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/scrollbar.js b/ui/file_manager/file_manager/foreground/js/ui/scrollbar.js
index 5a8e42caafe39398357fbe17360815933a68d307..3ba87b0b6f892c99f95a331e29b51576022bf1d1 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/scrollbar.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/scrollbar.js
@@ -13,7 +13,7 @@ var ScrollBar = cr.ui.define('div');
/**
* Mode of the scrollbar. As for now, only vertical scrollbars are supported.
- * @type {number}
+ * @enum {number}
*/
ScrollBar.Mode = {
VERTICAL: 0,
@@ -60,7 +60,7 @@ ScrollBar.prototype.decorate = function() {
/**
* Initialize a scrollbar.
*
- * @param {Element} parent Parent element, must have a relative or absolute
+ * @param {Element} parent Parent node, must have a relative or absolute
hirono 2014/10/16 07:24:47 nit: Parent node -> Parent element
fukino 2014/10/16 07:43:43 Done.
* positioning.
* @param {Element=} opt_scrollableArea Element with scrollable contents.
* If not passed, then call attachToView manually when the scrollable
@@ -81,7 +81,9 @@ ScrollBar.prototype.attachToView = function(view) {
this.view_.addEventListener('scroll', this.onScroll_.bind(this));
this.view_.addEventListener('relayout', this.onRelayout_.bind(this));
this.domObserver_ = new MutationObserver(this.onDomChanged_.bind(this));
- this.domObserver_.observe(this.view_, {subtree: true, attributes: true});
+ this.domObserver_.observe(
+ this.view_,
+ /** @type {MutationObserverInit} */ ({subtree: true, attributes: true}));
this.onRelayout_();
};

Powered by Google App Engine
This is Rietveld 408576698