Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (173432 => 173433)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-09-09 17:34:30 UTC (rev 173433)
@@ -1,3 +1,47 @@
+2014-09-09 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Fix ESLint eqeqeq warnings
+ https://bugs.webkit.org/show_bug.cgi?id=136658
+
+ 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):
+
2014-09-09 Jono Wells <[email protected]>
Web Inspector: Fix ESLint no-extra-semi
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -321,7 +321,7 @@
callback(null);
return;
}
- if (nodeIds.length != 1)
+ if (nodeIds.length !== 1)
return;
callback(this._idToDOMNode[nodeIds[0]]);
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -351,7 +351,7 @@
if (!type)
this._actions = [];
else
- this._actions = this._actions.filter(function(action) { action.type != type; });
+ this._actions = this._actions.filter(function(action) { action.type !== type; });
this.dispatchEventToListeners(WebInspector.Breakpoint.Event.ActionsDidChange);
},
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DOMTree.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Models/DOMTree.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DOMTree.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -140,7 +140,7 @@
function rootObjectAvailable(error, result)
{
// Check to see if we have been invalidated (if the callbacks were cleared).
- if (!this._pendingRootDOMNodeRequests || requestIdentifier != this._requestIdentifier)
+ if (!this._pendingRootDOMNodeRequests || requestIdentifier !== this._requestIdentifier)
return;
if (error) {
@@ -161,7 +161,7 @@
remoteObject.release();
// Check to see if we have been invalidated (if the callbacks were cleared).
- if (!this._pendingRootDOMNodeRequests || requestIdentifier != this._requestIdentifier)
+ if (!this._pendingRootDOMNodeRequests || requestIdentifier !== this._requestIdentifier)
return;
if (!nodeId) {
@@ -193,7 +193,7 @@
function dispatchCallbacks()
{
// Check to see if we have been invalidated (if the callbacks were cleared).
- if (!this._pendingRootDOMNodeRequests || requestIdentifier != this._requestIdentifier)
+ if (!this._pendingRootDOMNodeRequests || requestIdentifier !== this._requestIdentifier)
return;
for (var i = 0; i < this._pendingRootDOMNodeRequests.length; ++i)
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSet.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSet.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSet.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -109,7 +109,7 @@
removeProbe: function(probe)
{
console.assert(probe instanceof WebInspector.Probe, "Tried to remove non-probe ", probe, " to probe group", this);
- console.assert(this._probes.indexOf(probe) != -1, "Tried to remove probe", probe, " not in group ", this);
+ console.assert(this._probes.indexOf(probe) !== -1, "Tried to remove probe", probe, " not in group ", this);
console.assert(this._probesByIdentifier.has(probe.id), "Tried to remove probe", probe, " not in group ", this);
this._probes.splice(this._probes.indexOf(probe), 1);
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSetDataTable.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSetDataTable.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSetDataTable.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -74,7 +74,7 @@
{
// Eagerly save the frame if the batch identifier differs, or we know the frame is full.
// Create a new frame when the batch identifier differs.
- if (sample.batchId != this._previousBatchIdentifier) {
+ if (sample.batchId !== this._previousBatchIdentifier) {
if (this._openFrame) {
this._openFrame.fillMissingValues(this._probeSet);
this.addFrame(this._openFrame);
@@ -85,7 +85,7 @@
console.assert(this._openFrame, "Should always have an open frame before adding sample.", this, probe, sample);
this._openFrame.addSampleForProbe(probe, sample);
- if (this._openFrame.count == this._probeSet.probes.length) {
+ if (this._openFrame.count === this._probeSet.probes.length) {
this.addFrame(this._openFrame);
this._openFrame = null;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -139,7 +139,7 @@
// Parse characters until the end of the stream/line or a proper end quote character.
while ((ch = stream.next()) != null) {
- if (ch == quote && !escaped) {
+ if (ch === quote && !escaped) {
reachedEndOfURL = true;
break;
}
@@ -261,7 +261,7 @@
CodeMirror.defineExtension("hasLineClass", function(line, where, className) {
// This matches the arguments to addLineClass and removeLineClass.
- var classProperty = (where === "text" ? "textClass" : (where == "background" ? "bgClass" : "wrapClass"));
+ var classProperty = (where === "text" ? "textClass" : (where === "background" ? "bgClass" : "wrapClass"));
var lineInfo = this.lineInfo(line);
if (!lineInfo)
return false;
@@ -386,7 +386,7 @@
var newLength = alteredNumberString.length;
// Fix up the selection so it follows the increase or decrease in the replacement length.
- if (previousLength != newLength) {
+ if (previousLength !== newLength) {
if (selectionStart.line === from.line && selectionStart.ch > from.ch)
selectionStart.ch += newLength - previousLength;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CookieStorageContentView.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -169,7 +169,7 @@
// The main resource isn't always in the list of resources, make sure to add it to the list of resources
// we get the URLs from.
var mainResourceURLComponents = frames[i].mainResource.urlComponents;
- if (mainResourceURLComponents && mainResourceURLComponents.host && mainResourceURLComponents.host == this.representedObject.host)
+ if (mainResourceURLComponents && mainResourceURLComponents.host && mainResourceURLComponents.host === this.representedObject.host)
resourcesForDomain.push(frames[i].mainResource.url);
}
@@ -249,7 +249,7 @@
return false;
return (parsedURL.path.startsWith(cookie.path)
- && (!cookie.port || parsedURL.port == cookie.port)
+ && (!cookie.port || parsedURL.port === cookie.port)
&& (!cookie.secure || parsedURL.scheme === "https"));
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMStorageContentView.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -190,8 +190,8 @@
var previousValue = oldText.trim();
var enteredValue = newText.trim();
var columnIndex = this._dataGrid.orderedColumns.indexOf(columnIdentifier);
- var mayMoveToNextRow = moveDirection === "forward" && columnIndex == this._dataGrid.orderedColumns.length - 1;
- var mayMoveToPreviousRow = moveDirection === "backward" && columnIndex == 0;
+ var mayMoveToNextRow = moveDirection === "forward" && columnIndex === this._dataGrid.orderedColumns.length - 1;
+ var mayMoveToPreviousRow = moveDirection === "backward" && columnIndex === 0;
var willMoveRow = mayMoveToNextRow || mayMoveToPreviousRow;
var shouldCommitRow = willMoveRow && key.length && value.length;
@@ -233,7 +233,7 @@
editingNode.element.classList.remove(WebInspector.DOMStorageContentView.DuplicateKeySyleClassName);
- if (editingNode.__previousKeyValue != key)
+ if (editingNode.__previousKeyValue !== key)
domStorage.removeItem(editingNode.__previousKeyValue);
domStorage.setItem(key, value);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -36,7 +36,7 @@
// The title will be updated in onattach.
TreeElement.call(this, "", node, hasChildrenOverride);
- if (this.representedObject.nodeType() == Node.ELEMENT_NODE && !elementCloseTag)
+ if (this.representedObject.nodeType() === Node.ELEMENT_NODE && !elementCloseTag)
this._canAddAttributes = true;
this._searchQuery = null;
this._expandedChildrenLimit = WebInspector.DOMTreeElement.InitialChildrenLimit;
@@ -373,7 +373,7 @@
this.adjustCollapsedRange();
var lastChild = this.children.lastValue;
- if (this.representedObject.nodeType() == Node.ELEMENT_NODE && (!lastChild || !lastChild._elementCloseTag))
+ if (this.representedObject.nodeType() === Node.ELEMENT_NODE && (!lastChild || !lastChild._elementCloseTag))
this.insertChildElement(this.representedObject, this.children.length, true);
// We want to restore the original selection and tree scroll position after a full refresh, if possible.
@@ -536,10 +536,10 @@
_startEditingTarget: function(eventTarget)
{
- if (this.treeOutline.selectedDOMNode() != this.representedObject)
+ if (this.treeOutline.selectedDOMNode() !== this.representedObject)
return;
- if (this.representedObject.nodeType() != Node.ELEMENT_NODE && this.representedObject.nodeType() != Node.TEXT_NODE)
+ if (this.representedObject.nodeType() !== Node.ELEMENT_NODE && this.representedObject.nodeType() !== Node.TEXT_NODE)
return false;
var textNode = eventTarget.enclosingNodeOrSelfWithClass("html-text-node");
@@ -939,7 +939,7 @@
// We only show text nodes inline in elements if the element only
// has a single child, and that child is a text node.
textNode = this.representedObject.firstChild;
- } else if (this.representedObject.nodeType() == Node.TEXT_NODE)
+ } else if (this.representedObject.nodeType() === Node.TEXT_NODE)
textNode = this.representedObject;
textNode.setNodeValue(newText, this.updateTitle.bind(this));
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -1025,7 +1025,7 @@
{
var collapserColumnIdentifier = null;
for (var [identifier, column] of this.columns) {
- if (column["collapsesGroup"] == columnGroup) {
+ if (column["collapsesGroup"] === columnGroup) {
collapserColumnIdentifier = identifier;
break;
}
@@ -1262,9 +1262,9 @@
leftEdgeOfPreviousColumn += firstRowCells[i].offsetWidth;
// Differences for other resize methods
- if (this.resizeMethod == WebInspector.DataGrid.ResizeMethod.Last) {
+ if (this.resizeMethod === WebInspector.DataGrid.ResizeMethod.Last) {
rightCellIndex = this.resizerElements.length;
- } else if (this.resizeMethod == WebInspector.DataGrid.ResizeMethod.First) {
+ } else if (this.resizeMethod === WebInspector.DataGrid.ResizeMethod.First) {
leftEdgeOfPreviousColumn += firstRowCells[leftCellIndex].offsetWidth - firstRowCells[0].offsetWidth;
leftCellIndex = 0;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseContentView.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseContentView.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DatabaseContentView.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -133,7 +133,7 @@
{
if (error.message)
var message = error.message;
- else if (error.code == 2)
+ else if (error.code === 2)
var message = WebInspector.UIString("Database no longer has expected version.");
else
var message = WebInspector.UIString("An unexpected error %s occurred.").format(error.code);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionSimpleRow.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionSimpleRow.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionSimpleRow.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -52,7 +52,7 @@
return;
var currentRange = currentSelection.getRangeAt(0);
- if (!currentRange || currentRange.startContainer == currentRange.endContainer)
+ if (!currentRange || currentRange.startContainer === currentRange.endContainer)
return;
var correctedRange = document.createRange();
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Slider.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Views/Slider.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Slider.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -129,7 +129,7 @@
get _maxX()
{
- if (this.__maxX == 0 && document.body.contains(this._element))
+ if (this.__maxX === 0 && document.body.contains(this._element))
this.__maxX = this._element.offsetWidth - Math.ceil(WebInspector.Slider.KnobWidth / 2);
return this.__maxX;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js (173432 => 173433)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js 2014-09-09 17:31:18 UTC (rev 173432)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js 2014-09-09 17:34:30 UTC (rev 173433)
@@ -846,7 +846,7 @@
if (this._listItemNode) {
this._listItemNode.classList.add("expanded");
- if (this._childrenListNode && this._childrenListNode.parentNode != this._listItemNode.parentNode)
+ if (this._childrenListNode && this._childrenListNode.parentNode !== this._listItemNode.parentNode)
this.parent._childrenListNode.insertBefore(this._childrenListNode, this._listItemNode.nextSibling);
}