Title: [144753] trunk/Source/WebCore
Revision
144753
Author
[email protected]
Date
2013-03-05 05:33:41 -0800 (Tue, 05 Mar 2013)

Log Message

Web Inspector: Clarify some StylesSidebarPanel and CSSMetadata JSDocs.
https://bugs.webkit.org/show_bug.cgi?id=111427

Reviewed by Alexander Pavlov.

Goal: reflect in JSDoc that non-null array is passed to completionsReady callback.

* inspector/front-end/CSSMetadata.js:
Added JSDocs, avoided possible NPEs.
* inspector/front-end/StylesSidebarPane.js:
Fixed JSDocs, removed unused assignment.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (144752 => 144753)


--- trunk/Source/WebCore/ChangeLog	2013-03-05 13:29:37 UTC (rev 144752)
+++ trunk/Source/WebCore/ChangeLog	2013-03-05 13:33:41 UTC (rev 144753)
@@ -1,3 +1,17 @@
+2013-03-05  Eugene Klyuchnikov  <[email protected]>
+
+        Web Inspector: Clarify some StylesSidebarPanel and CSSMetadata JSDocs.
+        https://bugs.webkit.org/show_bug.cgi?id=111427
+
+        Reviewed by Alexander Pavlov.
+
+        Goal: reflect in JSDoc that non-null array is passed to completionsReady callback.
+
+        * inspector/front-end/CSSMetadata.js:
+        Added JSDocs, avoided possible NPEs.
+        * inspector/front-end/StylesSidebarPane.js:
+        Fixed JSDocs, removed unused assignment.
+
 2013-03-05  David Kilzer  <[email protected]>
 
         BUILD FIX (r144727): Change type of columnRange and rowRange to pair<unsigned, unsigned>

Modified: trunk/Source/WebCore/inspector/front-end/CSSMetadata.js (144752 => 144753)


--- trunk/Source/WebCore/inspector/front-end/CSSMetadata.js	2013-03-05 13:29:37 UTC (rev 144752)
+++ trunk/Source/WebCore/inspector/front-end/CSSMetadata.js	2013-03-05 13:33:41 UTC (rev 144753)
@@ -36,7 +36,7 @@
  */
 WebInspector.CSSMetadata = function(properties)
 {
-    this._values = [];
+    this._values = /** !Array.<string> */ ([]);
     this._longhands = {};
     this._shorthands = {};
     for (var i = 0; i < properties.length; ++i) {
@@ -67,9 +67,9 @@
 }
 
 /**
- * @type {WebInspector.CSSMetadata}
+ * @type {!WebInspector.CSSMetadata}
  */
-WebInspector.CSSMetadata.cssPropertiesMetainfo = null;
+WebInspector.CSSMetadata.cssPropertiesMetainfo = new WebInspector.CSSMetadata([]);
 
 WebInspector.CSSMetadata.isColorAwareProperty = function(propertyName)
 {
@@ -673,7 +673,7 @@
 
 /**
  * @param {string} propertyName
- * @return {WebInspector.CSSMetadata}
+ * @return {!WebInspector.CSSMetadata}
  */
 WebInspector.CSSMetadata.keywordsForProperty = function(propertyName)
 {
@@ -841,6 +841,10 @@
 
 
 WebInspector.CSSMetadata.prototype = {
+    /**
+     * @param {string} prefix
+     * @return {!Array.<string>}
+     */
     startsWith: function(prefix)
     {
         var firstIndex = this._firstIndexOfPrefix(prefix);

Modified: trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js (144752 => 144753)


--- trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js	2013-03-05 13:29:37 UTC (rev 144752)
+++ trunk/Source/WebCore/inspector/front-end/StylesSidebarPane.js	2013-03-05 13:33:41 UTC (rev 144753)
@@ -2220,7 +2220,6 @@
         if (!isEditingName) {
             if (selectElement !== this.valueElement) {
                 // Click in the LI - start editing value.
-                isEditingName = false;
                 selectElement = this.valueElement;
             }
 
@@ -2647,9 +2646,11 @@
 /**
  * @constructor
  * @extends {WebInspector.TextPrompt}
- * @param {function(*)=} acceptCallback
+ * @param {!WebInspector.CSSMetadata} cssCompletions
+ * @param {!WebInspector.StylePropertyTreeElement} sidebarPane
+ * @param {boolean} isEditingName
  */
-WebInspector.StylesSidebarPane.CSSPropertyPrompt = function(cssCompletions, sidebarPane, isEditingName, acceptCallback)
+WebInspector.StylesSidebarPane.CSSPropertyPrompt = function(cssCompletions, sidebarPane, isEditingName)
 {
     // Use the same callback both for applyItemCallback and acceptItemCallback.
     WebInspector.TextPrompt.call(this, this._buildPropertyCompletions.bind(this), WebInspector.StyleValueDelimiters);
@@ -2721,7 +2722,7 @@
      * @param {Element} proxyElement
      * @param {Range} wordRange
      * @param {boolean} force
-     * @param {function(Array.<string>, number=)} completionsReadyCallback
+     * @param {function(!Array.<string>, number=)} completionsReadyCallback
      */
     _buildPropertyCompletions: function(proxyElement, wordRange, force, completionsReadyCallback)
     {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to