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

Unified Diff: Source/devtools/front_end/components/FilterBar.js

Issue 340513003: DevTools: Add JSDoc for static methods, fix JSDoc types and induced errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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: Source/devtools/front_end/components/FilterBar.js
diff --git a/Source/devtools/front_end/components/FilterBar.js b/Source/devtools/front_end/components/FilterBar.js
index c71009107b1189f9f0d824fda654de0cac8deacf..e4f1585aa0882ac9de33222cad84ee547be3ab0d 100644
--- a/Source/devtools/front_end/components/FilterBar.js
+++ b/Source/devtools/front_end/components/FilterBar.js
@@ -208,7 +208,7 @@ WebInspector.TextFilterUI = function(supportRegex)
this._filterElement = document.createElement("div");
this._filterElement.className = "filter-text-filter";
- this._filterInputElement = this._filterElement.createChild("input", "search-replace toolbar-replace-control");
+ this._filterInputElement = /** @type {!HTMLInputElement} */ (this._filterElement.createChild("input", "search-replace toolbar-replace-control"));
this._filterInputElement.placeholder = WebInspector.UIString("Filter");
this._filterInputElement.id = "filter-input-field";
this._filterInputElement.addEventListener("mousedown", this._onFilterFieldManualFocus.bind(this), false); // when the search field is manually selected
@@ -301,18 +301,12 @@ WebInspector.TextFilterUI.prototype = {
}
},
- /**
- * @param {!WebInspector.Event} event
- */
- _onInput: function(event)
+ _onInput: function()
{
this._valueChanged(true);
},
- /**
- * @param {!WebInspector.Event} event
- */
- _onChange: function(event)
+ _onChange: function()
{
this._valueChanged(false);
},
@@ -383,7 +377,7 @@ WebInspector.TextFilterUI.prototype = {
},
/**
- * @param {!KeyboardEvent} event
+ * @param {?Event} event
* @return {boolean}
*/
_onInputKeyDown: function(event)
@@ -400,7 +394,7 @@ WebInspector.TextFilterUI.prototype = {
this._valueChanged(true);
handled = true;
} else {
- handled = this._suggestBox.keyPressed(event);
+ handled = this._suggestBox.keyPressed(/** @type {!KeyboardEvent} */ (event));
}
}
if (handled)
@@ -556,7 +550,7 @@ WebInspector.NamedBitSetFilterUI.prototype = {
},
/**
- * @param {!Event} e
+ * @param {?Event} e
*/
_onTypeFilterClicked: function(e)
{

Powered by Google App Engine
This is Rietveld 408576698