Title: [187147] trunk/Source/WebInspectorUI
Revision
187147
Author
commit-qu...@webkit.org
Date
2015-07-21 19:35:18 -0700 (Tue, 21 Jul 2015)

Log Message

Web Inspector: console.log("%d", 0) or console.log("%d", "str") show nothing, expected Number or NaN
https://bugs.webkit.org/show_bug.cgi?id=147163

Patch by Joseph Pecoraro <pecor...@apple.com> on 2015-07-21
Reviewed by Timothy Hatcher.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.append):
When appending the result for a substitution formatter, don't check against a
falsey value, check against undefined. This will allow falsely values like
0 and NaN to be output as expected.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (187146 => 187147)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-07-22 01:49:40 UTC (rev 187146)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-07-22 02:35:18 UTC (rev 187147)
@@ -1,5 +1,18 @@
 2015-07-21  Joseph Pecoraro  <pecor...@apple.com>
 
+        Web Inspector: console.log("%d", 0) or console.log("%d", "str") show nothing, expected Number or NaN
+        https://bugs.webkit.org/show_bug.cgi?id=147163
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/ConsoleMessageView.js:
+        (WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.append):
+        When appending the result for a substitution formatter, don't check against a
+        falsey value, check against undefined. This will allow falsely values like
+        0 and NaN to be output as expected.
+
+2015-07-21  Joseph Pecoraro  <pecor...@apple.com>
+
         Web Inspector: Total download size doesn't update soon after loading
         https://bugs.webkit.org/show_bug.cgi?id=147161
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (187146 => 187147)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js	2015-07-22 01:49:40 UTC (rev 187146)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js	2015-07-22 02:35:18 UTC (rev 187147)
@@ -609,7 +609,7 @@
         {
             if (b instanceof Node)
                 a.appendChild(b);
-            else if (b) {
+            else if (b !== undefined) {
                 var toAppend = WebInspector.linkifyStringAsFragment(b.toString());
                 if (currentStyle) {
                     var wrapper = document.createElement("span");
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to