Title: [139873] trunk/Source/WebCore
Revision
139873
Author
commit-qu...@webkit.org
Date
2013-01-16 05:11:28 -0800 (Wed, 16 Jan 2013)

Log Message

Web Inspector: fix Сlosure warnings in devTools front-end
https://bugs.webkit.org/show_bug.cgi?id=106993

Patch by Andrey Lushnikov <lushni...@chromium.org> on 2013-01-16
Reviewed by Vsevolod Vlasov.

Add missing annotations and rename Element.remove() method to avoid collision with HTMLSelectElement.remove() method.

No new tests: no change in behaviour.

* inspector/front-end/DOMAgent.js:
(WebInspector.DOMNode.prototype.hasChildNodes):
(WebInspector.DOMNode.prototype.getChildNodes):
* inspector/front-end/DOMExtension.js:
(Element.prototype.removeSelf):
(removeSubsequentNodes):
* inspector/front-end/DefaultTextEditor.js:
* inspector/front-end/SettingsScreen.js:
(WebInspector.OverridesSettingsTab):
* inspector/front-end/SourceTokenizer.js:
(WebInspector.SourceTokenizer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (139872 => 139873)


--- trunk/Source/WebCore/ChangeLog	2013-01-16 12:41:47 UTC (rev 139872)
+++ trunk/Source/WebCore/ChangeLog	2013-01-16 13:11:28 UTC (rev 139873)
@@ -1,5 +1,28 @@
 2013-01-16  Andrey Lushnikov  <lushni...@chromium.org>
 
+        Web Inspector: fix Сlosure warnings in devTools front-end
+        https://bugs.webkit.org/show_bug.cgi?id=106993
+
+        Reviewed by Vsevolod Vlasov.
+
+        Add missing annotations and rename Element.remove() method to avoid collision with HTMLSelectElement.remove() method.
+
+        No new tests: no change in behaviour.
+
+        * inspector/front-end/DOMAgent.js:
+        (WebInspector.DOMNode.prototype.hasChildNodes):
+        (WebInspector.DOMNode.prototype.getChildNodes):
+        * inspector/front-end/DOMExtension.js:
+        (Element.prototype.removeSelf):
+        (removeSubsequentNodes):
+        * inspector/front-end/DefaultTextEditor.js:
+        * inspector/front-end/SettingsScreen.js:
+        (WebInspector.OverridesSettingsTab):
+        * inspector/front-end/SourceTokenizer.js:
+        (WebInspector.SourceTokenizer):
+
+2013-01-16  Andrey Lushnikov  <lushni...@chromium.org>
+
         Web Inspector: fix backward compatibility issues with Element.remove() method
         https://bugs.webkit.org/show_bug.cgi?id=106996
 

Modified: trunk/Source/WebCore/inspector/front-end/DOMAgent.js (139872 => 139873)


--- trunk/Source/WebCore/inspector/front-end/DOMAgent.js	2013-01-16 12:41:47 UTC (rev 139872)
+++ trunk/Source/WebCore/inspector/front-end/DOMAgent.js	2013-01-16 13:11:28 UTC (rev 139873)
@@ -135,7 +135,7 @@
      */
     hasChildNodes: function()
     {
-        return this._childNodeCount > 0 || !!this._shadowRoots.length || this._templateContent;
+        return this._childNodeCount > 0 || !!this._shadowRoots.length || !!this._templateContent;
     },
 
     /**
@@ -297,7 +297,7 @@
                 callback(this.children);
         }
 
-        DOMAgent.requestChildNodes(this.id, mycallback.bind(this));
+        DOMAgent.requestChildNodes(this.id, undefined, mycallback.bind(this));
     },
 
     /**

Modified: trunk/Source/WebCore/inspector/front-end/DOMExtension.js (139872 => 139873)


--- trunk/Source/WebCore/inspector/front-end/DOMExtension.js	2013-01-16 12:41:47 UTC (rev 139872)
+++ trunk/Source/WebCore/inspector/front-end/DOMExtension.js	2013-01-16 13:11:28 UTC (rev 139873)
@@ -211,14 +211,14 @@
     return this.scrollTop + this.clientHeight === this.scrollHeight;
 }
 
-Element.prototype.remove = function()
+Element.prototype.removeSelf = function()
 {
     if (this.parentElement)
         this.parentElement.removeChild(this);
 }
 
-CharacterData.prototype.remove = Element.prototype.remove;
-DocumentType.prototype.remove = Element.prototype.remove;
+CharacterData.prototype.removeSelf = Element.prototype.removeSelf;
+DocumentType.prototype.removeSelf = Element.prototype.removeSelf;
 
 /**
  * @param {Node} fromNode
@@ -229,7 +229,7 @@
     for (var node = fromNode; node && node !== toNode; ) {
         var nodeToRemove = node;
         node = node.nextSibling;
-        nodeToRemove.remove();
+        nodeToRemove.removeSelf();
     }
 }
 

Modified: trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js (139872 => 139873)


--- trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js	2013-01-16 12:41:47 UTC (rev 139872)
+++ trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js	2013-01-16 13:11:28 UTC (rev 139873)
@@ -1990,7 +1990,7 @@
     /**
      * @param {Element} lineRow
      * @param {string} line
-     * @param {Array.<{startColumn: number, endColumn: number, cssClass: string}>} ranges
+     * @param {Array.<{startColumn: number, endColumn: number, token: ?string}>} ranges
      */
     _renderRanges: function(lineRow, line, ranges)
     {

Modified: trunk/Source/WebCore/inspector/front-end/SettingsScreen.js (139872 => 139873)


--- trunk/Source/WebCore/inspector/front-end/SettingsScreen.js	2013-01-16 12:41:47 UTC (rev 139872)
+++ trunk/Source/WebCore/inspector/front-end/SettingsScreen.js	2013-01-16 13:11:28 UTC (rev 139873)
@@ -424,7 +424,7 @@
     WebInspector.SettingsTab.call(this, WebInspector.UIString("Overrides"), "overrides-tab-content");
     this._view = new WebInspector.OverridesView();
     this.containerElement.parentElement.appendChild(this._view.containerElement);
-    this.containerElement.remove();
+    this.containerElement.removeSelf();
     this.containerElement = this._view.containerElement;
 }
 

Modified: trunk/Source/WebCore/inspector/front-end/SourceTokenizer.js (139872 => 139873)


--- trunk/Source/WebCore/inspector/front-end/SourceTokenizer.js	2013-01-16 12:41:47 UTC (rev 139872)
+++ trunk/Source/WebCore/inspector/front-end/SourceTokenizer.js	2013-01-16 13:11:28 UTC (rev 139873)
@@ -34,6 +34,8 @@
  */
 WebInspector.SourceTokenizer = function()
 {
+    /** @type {?string} */
+    this.tokenType = null;
 }
 
 WebInspector.SourceTokenizer.prototype = {
@@ -61,6 +63,10 @@
         this.condition.lexCondition = lexCondition;
     },
 
+    /**
+     * @param {number} cursor
+     * @return {string}
+     */
     _charAt: function(cursor)
     {
         return cursor < this._line.length ? this._line.charAt(cursor) : "\n";
@@ -70,6 +76,10 @@
     {
     },
 
+    /**
+     * @param {number} cursor
+     * @return {number}
+     */
     nextToken: function(cursor)
     {
     }
@@ -88,6 +98,9 @@
     };
 }
 
+/**
+ * @return {WebInspector.SourceTokenizer.Registry}
+ */
 WebInspector.SourceTokenizer.Registry.getInstance = function()
 {
     if (!WebInspector.SourceTokenizer.Registry._instance)
@@ -96,6 +109,10 @@
 }
 
 WebInspector.SourceTokenizer.Registry.prototype = {
+    /**
+     * @param {string} mimeType
+     * @return {WebInspector.SourceTokenizer}
+     */
     getTokenizer: function(mimeType)
     {
         if (!this._tokenizerConstructors[mimeType])
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to