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

Unified Diff: Source/devtools/front_end/elements/StylesSidebarPane.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/elements/StylesSidebarPane.js
diff --git a/Source/devtools/front_end/elements/StylesSidebarPane.js b/Source/devtools/front_end/elements/StylesSidebarPane.js
index 7e8eaa0b99d95deafc57e4451e312025890faa3d..f1966ee0c875e5d1531d1dc4ad7e851a74893488 100644
--- a/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -93,6 +93,7 @@ WebInspector.StylesSidebarPane._colorRegex = /((?:rgb|hsl)a?\([^)]+\)|#[0-9a-fA-
/**
* @param {!WebInspector.CSSProperty} property
+ * @return {!Element}
*/
WebInspector.StylesSidebarPane.createExclamationMark = function(property)
{
@@ -2688,7 +2689,7 @@ WebInspector.StylePropertyTreeElement.prototype = {
},
/**
- * @param {!Element=} selectElement
+ * @param {?Element=} selectElement
*/
startEditing: function(selectElement)
{
@@ -2706,7 +2707,7 @@ WebInspector.StylePropertyTreeElement.prototype = {
if (!selectElement)
selectElement = this.nameElement; // No arguments passed in - edit the name element by default.
else
- selectElement = selectElement.enclosingNodeOrSelfWithClass("webkit-css-property") || selectElement.enclosingNodeOrSelfWithClass("value");
+ selectElement = /** @type {?Element} */ (selectElement.enclosingNodeOrSelfWithClass("webkit-css-property") || selectElement.enclosingNodeOrSelfWithClass("value"));
aandrey 2014/06/17 11:33:54 why this cast?
apavlov 2014/06/17 12:46:03 Thanks, refined the return type
if (WebInspector.isBeingEdited(selectElement))
return;

Powered by Google App Engine
This is Rietveld 408576698