Title: [173494] trunk/Source/WebInspectorUI
- Revision
- 173494
- Author
- [email protected]
- Date
- 2014-09-10 15:41:20 -0700 (Wed, 10 Sep 2014)
Log Message
Web Inspector: Eliminate typeof "undefined" checks
https://bugs.webkit.org/show_bug.cgi?id=136691
Patch by Joseph Pecoraro <[email protected]> on 2014-09-10
Reviewed by Alexey Proskuryakov.
* UserInterface/Base/Main.js:
(WebInspector.linkifyURLAsNode):
(WebInspector.linkifyStringAsFragment):
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Command.prototype._invokeWithArguments):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.get resizeMethod):
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype.get minimumWidth):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (173493 => 173494)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-09-10 22:22:50 UTC (rev 173493)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-09-10 22:41:20 UTC (rev 173494)
@@ -1,5 +1,22 @@
2014-09-10 Joseph Pecoraro <[email protected]>
+ Web Inspector: Eliminate typeof "undefined" checks
+ https://bugs.webkit.org/show_bug.cgi?id=136691
+
+ Reviewed by Alexey Proskuryakov.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.linkifyURLAsNode):
+ (WebInspector.linkifyStringAsFragment):
+ * UserInterface/Protocol/InspectorBackend.js:
+ (InspectorBackend.Command.prototype._invokeWithArguments):
+ * UserInterface/Views/DataGrid.js:
+ (WebInspector.DataGrid.prototype.get resizeMethod):
+ * UserInterface/Views/NavigationBar.js:
+ (WebInspector.NavigationBar.prototype.get minimumWidth):
+
+2014-09-10 Joseph Pecoraro <[email protected]>
+
Web Inspector: Fix obscure ESLint warnings and skip directories
https://bugs.webkit.org/show_bug.cgi?id=136686
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (173493 => 173494)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2014-09-10 22:22:50 UTC (rev 173493)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2014-09-10 22:41:20 UTC (rev 173494)
@@ -1626,7 +1626,7 @@
a.href = ""
a.className = classes;
- if (typeof tooltipText === "undefined")
+ if (tooltipText === undefined)
a.title = url;
else if (typeof tooltipText !== "string" || tooltipText.length)
a.title = tooltipText;
@@ -1675,7 +1675,7 @@
function linkifier(title, url, lineNumber)
{
var urlNode = WebInspector.linkifyURLAsNode(url, title, undefined);
- if (typeof(lineNumber) !== "undefined")
+ if (lineNumber !== undefined)
urlNode.lineNumber = lineNumber;
return urlNode;
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js (173493 => 173494)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js 2014-09-10 22:22:50 UTC (rev 173493)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js 2014-09-10 22:41:20 UTC (rev 173494)
@@ -430,7 +430,7 @@
}
var value = commandArguments.shift();
- if (optionalFlag && typeof value === "undefined")
+ if (optionalFlag && value === undefined)
continue;
if (typeof value !== typeName) {
@@ -442,7 +442,7 @@
}
if (commandArguments.length === 1 && !callback) {
- if (typeof commandArguments[0] !== "undefined") {
+ if (commandArguments[0] !== undefined) {
console.error("Protocol Error: Optional callback argument for method '" + instance.qualifiedName + "' call must be a function but its type is '" + typeof args[0] + "'.");
return;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (173493 => 173494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2014-09-10 22:22:50 UTC (rev 173493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2014-09-10 22:41:20 UTC (rev 173494)
@@ -414,7 +414,7 @@
},
insertColumn: function(columnIdentifier, columnData, insertionIndex) {
- if (typeof insertionIndex === "undefined")
+ if (insertionIndex === undefined)
insertionIndex = this.orderedColumns.length;
insertionIndex = Number.constrain(insertionIndex, 0, this.orderedColumns.length);
@@ -1217,7 +1217,7 @@
get resizeMethod()
{
- if (typeof this._resizeMethod === "undefined")
+ if (!this._resizeMethod)
return WebInspector.DataGrid.ResizeMethod.Nearest;
return this._resizeMethod;
},
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js (173493 => 173494)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js 2014-09-10 22:22:50 UTC (rev 173493)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NavigationBar.js 2014-09-10 22:41:20 UTC (rev 173494)
@@ -233,7 +233,7 @@
get minimumWidth()
{
- if (typeof this._minimumWidth === "undefined" || this._minimumWidthNeedsRecalculation) {
+ if (this._minimumWidth === undefined || this._minimumWidthNeedsRecalculation) {
this._minimumWidth = this._calculateMinimumWidth();
delete this._minimumWidthNeedsRecalculation;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes