Changeset 173433 in webkit


Ignore:
Timestamp:
Sep 9, 2014, 10:34:30 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Fix ESLint eqeqeq warnings
https://bugs.webkit.org/show_bug.cgi?id=136658

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2014-09-09
Reviewed by Andy Estes.

  • UserInterface/Controllers/DOMTreeManager.js:

(WebInspector.DOMTreeManager.prototype.mycallback):
(WebInspector.DOMTreeManager.prototype.searchResult):

  • UserInterface/Models/Breakpoint.js:

(WebInspector.Breakpoint.prototype.clearActions):

  • UserInterface/Models/DOMTree.js:

(WebInspector.DOMTree.prototype._requestRootDOMNode.rootObjectAvailable):
(WebInspector.DOMTree.prototype._requestRootDOMNode.rootDOMNodeAvailable):
(WebInspector.DOMTree.prototype._requestRootDOMNode.dispatchCallbacks):
(WebInspector.DOMTree.prototype._requestRootDOMNode):

  • UserInterface/Models/ProbeSet.js:

(WebInspector.ProbeSet.prototype.removeProbe):

  • UserInterface/Models/ProbeSetDataTable.js:

(WebInspector.ProbeSetDataTable.prototype.addSampleForProbe):

  • UserInterface/Views/CodeMirrorAdditions.js:
  • UserInterface/Views/CookieStorageContentView.js:

(WebInspector.CookieStorageContentView.prototype._filterCookies):
(WebInspector.cookieMatchesResourceURL):

  • UserInterface/Views/DOMStorageContentView.js:

(WebInspector.DOMStorageContentView.prototype._editingCallback):

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement):
(WebInspector.DOMTreeElement.prototype._updateChildren):
(WebInspector.DOMTreeElement.prototype._startEditingTarget):
(WebInspector.DOMTreeElement.prototype._textNodeEditingCommitted):

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype._resizerDragging):

  • UserInterface/Views/DatabaseContentView.js:

(WebInspector.DatabaseContentView.prototype._queryError):

  • UserInterface/Views/DetailsSectionSimpleRow.js:

(.valueElementClicked):
(WebInspector.DetailsSectionSimpleRow):

  • UserInterface/Views/Slider.js:

(WebInspector.Slider.prototype.get _maxX):

  • UserInterface/Views/TreeOutline.js:

(TreeElement.prototype.expand):

Location:
trunk/Source/WebInspectorUI
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r173432 r173433  
     12014-09-09  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Fix ESLint eqeqeq warnings
     4        https://bugs.webkit.org/show_bug.cgi?id=136658
     5
     6        Reviewed by Andy Estes.
     7
     8        * UserInterface/Controllers/DOMTreeManager.js:
     9        (WebInspector.DOMTreeManager.prototype.mycallback):
     10        (WebInspector.DOMTreeManager.prototype.searchResult):
     11        * UserInterface/Models/Breakpoint.js:
     12        (WebInspector.Breakpoint.prototype.clearActions):
     13        * UserInterface/Models/DOMTree.js:
     14        (WebInspector.DOMTree.prototype._requestRootDOMNode.rootObjectAvailable):
     15        (WebInspector.DOMTree.prototype._requestRootDOMNode.rootDOMNodeAvailable):
     16        (WebInspector.DOMTree.prototype._requestRootDOMNode.dispatchCallbacks):
     17        (WebInspector.DOMTree.prototype._requestRootDOMNode):
     18        * UserInterface/Models/ProbeSet.js:
     19        (WebInspector.ProbeSet.prototype.removeProbe):
     20        * UserInterface/Models/ProbeSetDataTable.js:
     21        (WebInspector.ProbeSetDataTable.prototype.addSampleForProbe):
     22        * UserInterface/Views/CodeMirrorAdditions.js:
     23        * UserInterface/Views/CookieStorageContentView.js:
     24        (WebInspector.CookieStorageContentView.prototype._filterCookies):
     25        (WebInspector.cookieMatchesResourceURL):
     26        * UserInterface/Views/DOMStorageContentView.js:
     27        (WebInspector.DOMStorageContentView.prototype._editingCallback):
     28        * UserInterface/Views/DOMTreeElement.js:
     29        (WebInspector.DOMTreeElement):
     30        (WebInspector.DOMTreeElement.prototype._updateChildren):
     31        (WebInspector.DOMTreeElement.prototype._startEditingTarget):
     32        (WebInspector.DOMTreeElement.prototype._textNodeEditingCommitted):
     33        * UserInterface/Views/DataGrid.js:
     34        (WebInspector.DataGrid.prototype._resizerDragging):
     35        * UserInterface/Views/DatabaseContentView.js:
     36        (WebInspector.DatabaseContentView.prototype._queryError):
     37        * UserInterface/Views/DetailsSectionSimpleRow.js:
     38        (.valueElementClicked):
     39        (WebInspector.DetailsSectionSimpleRow):
     40        * UserInterface/Views/Slider.js:
     41        (WebInspector.Slider.prototype.get _maxX):
     42        * UserInterface/Views/TreeOutline.js:
     43        (TreeElement.prototype.expand):
     44
    1452014-09-09  Jono Wells  <jonowells@apple.com>
    246
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js

    r172662 r173433  
    322322                    return;
    323323                }
    324                 if (nodeIds.length != 1)
     324                if (nodeIds.length !== 1)
    325325                    return;
    326326
  • trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js

    r172204 r173433  
    352352            this._actions = [];
    353353        else
    354             this._actions = this._actions.filter(function(action) { action.type != type; });
     354            this._actions = this._actions.filter(function(action) { action.type !== type; });
    355355
    356356        this.dispatchEventToListeners(WebInspector.Breakpoint.Event.ActionsDidChange);
  • trunk/Source/WebInspectorUI/UserInterface/Models/DOMTree.js

    r164543 r173433  
    141141        {
    142142            // Check to see if we have been invalidated (if the callbacks were cleared).
    143             if (!this._pendingRootDOMNodeRequests || requestIdentifier != this._requestIdentifier)
     143            if (!this._pendingRootDOMNodeRequests || requestIdentifier !== this._requestIdentifier)
    144144                return;
    145145
     
    162162
    163163            // Check to see if we have been invalidated (if the callbacks were cleared).
    164             if (!this._pendingRootDOMNodeRequests || requestIdentifier != this._requestIdentifier)
     164            if (!this._pendingRootDOMNodeRequests || requestIdentifier !== this._requestIdentifier)
    165165                return;
    166166
     
    194194        {
    195195            // Check to see if we have been invalidated (if the callbacks were cleared).
    196             if (!this._pendingRootDOMNodeRequests || requestIdentifier != this._requestIdentifier)
     196            if (!this._pendingRootDOMNodeRequests || requestIdentifier !== this._requestIdentifier)
    197197                return;
    198198
  • trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSet.js

    r164543 r173433  
    110110    {
    111111        console.assert(probe instanceof WebInspector.Probe, "Tried to remove non-probe ", probe, " to probe group", this);
    112         console.assert(this._probes.indexOf(probe) != -1, "Tried to remove probe", probe, " not in group ", this);
     112        console.assert(this._probes.indexOf(probe) !== -1, "Tried to remove probe", probe, " not in group ", this);
    113113        console.assert(this._probesByIdentifier.has(probe.id), "Tried to remove probe", probe, " not in group ", this);
    114114
  • trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSetDataTable.js

    r164543 r173433  
    7575        // Eagerly save the frame if the batch identifier differs, or we know the frame is full.
    7676        // Create a new frame when the batch identifier differs.
    77         if (sample.batchId != this._previousBatchIdentifier) {
     77        if (sample.batchId !== this._previousBatchIdentifier) {
    7878            if (this._openFrame) {
    7979                this._openFrame.fillMissingValues(this._probeSet);
     
    8686        console.assert(this._openFrame, "Should always have an open frame before adding sample.", this, probe, sample);
    8787        this._openFrame.addSampleForProbe(probe, sample);
    88         if (this._openFrame.count == this._probeSet.probes.length) {
     88        if (this._openFrame.count === this._probeSet.probes.length) {
    8989            this.addFrame(this._openFrame);
    9090            this._openFrame = null;
  • trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js

    r173431 r173433  
    140140        // Parse characters until the end of the stream/line or a proper end quote character.
    141141        while ((ch = stream.next()) != null) {
    142             if (ch == quote && !escaped) {
     142            if (ch === quote && !escaped) {
    143143                reachedEndOfURL = true;
    144144                break;
     
    262262    CodeMirror.defineExtension("hasLineClass", function(line, where, className) {
    263263        // This matches the arguments to addLineClass and removeLineClass.
    264         var classProperty = (where === "text" ? "textClass" : (where == "background" ? "bgClass" : "wrapClass"));
     264        var classProperty = (where === "text" ? "textClass" : (where === "background" ? "bgClass" : "wrapClass"));
    265265        var lineInfo = this.lineInfo(line);
    266266        if (!lineInfo)
     
    387387
    388388            // Fix up the selection so it follows the increase or decrease in the replacement length.
    389             if (previousLength != newLength) {
     389            if (previousLength !== newLength) {
    390390                if (selectionStart.line === from.line && selectionStart.ch > from.ch)
    391391                    selectionStart.ch += newLength - previousLength;
  • trunk/Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js

    r165487 r173433  
    170170            // we get the URLs from.
    171171            var mainResourceURLComponents = frames[i].mainResource.urlComponents;
    172             if (mainResourceURLComponents && mainResourceURLComponents.host && mainResourceURLComponents.host == this.representedObject.host)
     172            if (mainResourceURLComponents && mainResourceURLComponents.host && mainResourceURLComponents.host === this.representedObject.host)
    173173                resourcesForDomain.push(frames[i].mainResource.url);
    174174        }
     
    250250
    251251    return (parsedURL.path.startsWith(cookie.path)
    252         && (!cookie.port || parsedURL.port == cookie.port)
     252        && (!cookie.port || parsedURL.port === cookie.port)
    253253        && (!cookie.secure || parsedURL.scheme === "https"));
    254254}
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js

    r164543 r173433  
    191191        var enteredValue = newText.trim();
    192192        var columnIndex = this._dataGrid.orderedColumns.indexOf(columnIdentifier);
    193         var mayMoveToNextRow = moveDirection === "forward" && columnIndex == this._dataGrid.orderedColumns.length - 1;
    194         var mayMoveToPreviousRow = moveDirection === "backward" && columnIndex == 0;
     193        var mayMoveToNextRow = moveDirection === "forward" && columnIndex === this._dataGrid.orderedColumns.length - 1;
     194        var mayMoveToPreviousRow = moveDirection === "backward" && columnIndex === 0;
    195195        var willMoveRow = mayMoveToNextRow || mayMoveToPreviousRow;
    196196        var shouldCommitRow = willMoveRow && key.length && value.length;
     
    234234        editingNode.element.classList.remove(WebInspector.DOMStorageContentView.DuplicateKeySyleClassName);
    235235
    236         if (editingNode.__previousKeyValue != key)
     236        if (editingNode.__previousKeyValue !== key)
    237237            domStorage.removeItem(editingNode.__previousKeyValue);
    238238
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js

    r173431 r173433  
    3737    TreeElement.call(this, "", node, hasChildrenOverride);
    3838
    39     if (this.representedObject.nodeType() == Node.ELEMENT_NODE && !elementCloseTag)
     39    if (this.representedObject.nodeType() === Node.ELEMENT_NODE && !elementCloseTag)
    4040        this._canAddAttributes = true;
    4141    this._searchQuery = null;
     
    374374
    375375        var lastChild = this.children.lastValue;
    376         if (this.representedObject.nodeType() == Node.ELEMENT_NODE && (!lastChild || !lastChild._elementCloseTag))
     376        if (this.representedObject.nodeType() === Node.ELEMENT_NODE && (!lastChild || !lastChild._elementCloseTag))
    377377            this.insertChildElement(this.representedObject, this.children.length, true);
    378378
     
    537537    _startEditingTarget: function(eventTarget)
    538538    {
    539         if (this.treeOutline.selectedDOMNode() != this.representedObject)
    540             return;
    541 
    542         if (this.representedObject.nodeType() != Node.ELEMENT_NODE && this.representedObject.nodeType() != Node.TEXT_NODE)
     539        if (this.treeOutline.selectedDOMNode() !== this.representedObject)
     540            return;
     541
     542        if (this.representedObject.nodeType() !== Node.ELEMENT_NODE && this.representedObject.nodeType() !== Node.TEXT_NODE)
    543543            return false;
    544544
     
    940940            // has a single child, and that child is a text node.
    941941            textNode = this.representedObject.firstChild;
    942         } else if (this.representedObject.nodeType() == Node.TEXT_NODE)
     942        } else if (this.representedObject.nodeType() === Node.TEXT_NODE)
    943943            textNode = this.representedObject;
    944944
  • trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js

    r172241 r173433  
    10261026        var collapserColumnIdentifier = null;
    10271027        for (var [identifier, column] of this.columns) {
    1028             if (column["collapsesGroup"] == columnGroup) {
     1028            if (column["collapsesGroup"] === columnGroup) {
    10291029                collapserColumnIdentifier = identifier;
    10301030                break;
     
    12631263
    12641264        // Differences for other resize methods
    1265         if (this.resizeMethod == WebInspector.DataGrid.ResizeMethod.Last) {
     1265        if (this.resizeMethod === WebInspector.DataGrid.ResizeMethod.Last) {
    12661266            rightCellIndex = this.resizerElements.length;
    1267         } else if (this.resizeMethod == WebInspector.DataGrid.ResizeMethod.First) {
     1267        } else if (this.resizeMethod === WebInspector.DataGrid.ResizeMethod.First) {
    12681268            leftEdgeOfPreviousColumn += firstRowCells[leftCellIndex].offsetWidth - firstRowCells[0].offsetWidth;
    12691269            leftCellIndex = 0;
  • trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseContentView.js

    r173431 r173433  
    134134        if (error.message)
    135135            var message = error.message;
    136         else if (error.code == 2)
     136        else if (error.code === 2)
    137137            var message = WebInspector.UIString("Database no longer has expected version.");
    138138        else
  • trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionSimpleRow.js

    r164543 r173433  
    5353
    5454        var currentRange = currentSelection.getRangeAt(0);
    55         if (!currentRange || currentRange.startContainer == currentRange.endContainer)
     55        if (!currentRange || currentRange.startContainer === currentRange.endContainer)
    5656            return;
    5757
  • trunk/Source/WebInspectorUI/UserInterface/Views/Slider.js

    r164543 r173433  
    130130    get _maxX()
    131131    {
    132         if (this.__maxX == 0 && document.body.contains(this._element))
     132        if (this.__maxX === 0 && document.body.contains(this._element))
    133133            this.__maxX = this._element.offsetWidth - Math.ceil(WebInspector.Slider.KnobWidth / 2);
    134134
  • trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js

    r173431 r173433  
    847847    if (this._listItemNode) {
    848848        this._listItemNode.classList.add("expanded");
    849         if (this._childrenListNode && this._childrenListNode.parentNode != this._listItemNode.parentNode)
     849        if (this._childrenListNode && this._childrenListNode.parentNode !== this._listItemNode.parentNode)
    850850            this.parent._childrenListNode.insertBefore(this._childrenListNode, this._listItemNode.nextSibling);
    851851    }
Note: See TracChangeset for help on using the changeset viewer.