Changeset 139873 in webkit


Ignore:
Timestamp:
Jan 16, 2013 5:11:28 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Andrey Lushnikov <lushnikov@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):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r139871 r139873  
     12013-01-16  Andrey Lushnikov  <lushnikov@chromium.org>
     2
     3        Web Inspector: fix Сlosure warnings in devTools front-end
     4        https://bugs.webkit.org/show_bug.cgi?id=106993
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        Add missing annotations and rename Element.remove() method to avoid collision with HTMLSelectElement.remove() method.
     9
     10        No new tests: no change in behaviour.
     11
     12        * inspector/front-end/DOMAgent.js:
     13        (WebInspector.DOMNode.prototype.hasChildNodes):
     14        (WebInspector.DOMNode.prototype.getChildNodes):
     15        * inspector/front-end/DOMExtension.js:
     16        (Element.prototype.removeSelf):
     17        (removeSubsequentNodes):
     18        * inspector/front-end/DefaultTextEditor.js:
     19        * inspector/front-end/SettingsScreen.js:
     20        (WebInspector.OverridesSettingsTab):
     21        * inspector/front-end/SourceTokenizer.js:
     22        (WebInspector.SourceTokenizer):
     23
    1242013-01-16  Andrey Lushnikov  <lushnikov@chromium.org>
    225
  • trunk/Source/WebCore/inspector/front-end/DOMAgent.js

    r139429 r139873  
    136136    hasChildNodes: function()
    137137    {
    138         return this._childNodeCount > 0 || !!this._shadowRoots.length || this._templateContent;
     138        return this._childNodeCount > 0 || !!this._shadowRoots.length || !!this._templateContent;
    139139    },
    140140
     
    298298        }
    299299
    300         DOMAgent.requestChildNodes(this.id, mycallback.bind(this));
     300        DOMAgent.requestChildNodes(this.id, undefined, mycallback.bind(this));
    301301    },
    302302
  • trunk/Source/WebCore/inspector/front-end/DOMExtension.js

    r139871 r139873  
    212212}
    213213
    214 Element.prototype.remove = function()
     214Element.prototype.removeSelf = function()
    215215{
    216216    if (this.parentElement)
     
    218218}
    219219
    220 CharacterData.prototype.remove = Element.prototype.remove;
    221 DocumentType.prototype.remove = Element.prototype.remove;
     220CharacterData.prototype.removeSelf = Element.prototype.removeSelf;
     221DocumentType.prototype.removeSelf = Element.prototype.removeSelf;
    222222
    223223/**
     
    230230        var nodeToRemove = node;
    231231        node = node.nextSibling;
    232         nodeToRemove.remove();
     232        nodeToRemove.removeSelf();
    233233    }
    234234}
  • trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js

    r139844 r139873  
    19911991     * @param {Element} lineRow
    19921992     * @param {string} line
    1993      * @param {Array.<{startColumn: number, endColumn: number, cssClass: string}>} ranges
     1993     * @param {Array.<{startColumn: number, endColumn: number, token: ?string}>} ranges
    19941994     */
    19951995    _renderRanges: function(lineRow, line, ranges)
  • trunk/Source/WebCore/inspector/front-end/SettingsScreen.js

    r138144 r139873  
    425425    this._view = new WebInspector.OverridesView();
    426426    this.containerElement.parentElement.appendChild(this._view.containerElement);
    427     this.containerElement.remove();
     427    this.containerElement.removeSelf();
    428428    this.containerElement = this._view.containerElement;
    429429}
  • trunk/Source/WebCore/inspector/front-end/SourceTokenizer.js

    r127864 r139873  
    3535WebInspector.SourceTokenizer = function()
    3636{
     37    /** @type {?string} */
     38    this.tokenType = null;
    3739}
    3840
     
    6264    },
    6365
     66    /**
     67     * @param {number} cursor
     68     * @return {string}
     69     */
    6470    _charAt: function(cursor)
    6571    {
     
    7177    },
    7278
     79    /**
     80     * @param {number} cursor
     81     * @return {number}
     82     */
    7383    nextToken: function(cursor)
    7484    {
     
    8999}
    90100
     101/**
     102 * @return {WebInspector.SourceTokenizer.Registry}
     103 */
    91104WebInspector.SourceTokenizer.Registry.getInstance = function()
    92105{
     
    97110
    98111WebInspector.SourceTokenizer.Registry.prototype = {
     112    /**
     113     * @param {string} mimeType
     114     * @return {WebInspector.SourceTokenizer}
     115     */
    99116    getTokenizer: function(mimeType)
    100117    {
Note: See TracChangeset for help on using the changeset viewer.