Diff
Modified: trunk/LayoutTests/ChangeLog (143178 => 143179)
--- trunk/LayoutTests/ChangeLog 2013-02-18 10:20:08 UTC (rev 143178)
+++ trunk/LayoutTests/ChangeLog 2013-02-18 10:28:08 UTC (rev 143179)
@@ -1,3 +1,12 @@
+2013-02-18 Pavel Feldman <[email protected]>
+
+ Web Inspector: allow 0 as a formatted parameter in console message.
+ https://bugs.webkit.org/show_bug.cgi?id=110096
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/console/console-format.html:
+
2013-02-18 Ádám Kallai <[email protected]>
[Qt] Unreviewed gardening. Skipped failing tests.
Modified: trunk/LayoutTests/inspector/console/console-format-expected.txt (143178 => 143179)
--- trunk/LayoutTests/inspector/console/console-format-expected.txt 2013-02-18 10:20:08 UTC (rev 143178)
+++ trunk/LayoutTests/inspector/console/console-format-expected.txt 2013-02-18 10:28:08 UTC (rev 143179)
@@ -1,6 +1,7 @@
CONSOLE MESSAGE: line 20: test,test2,,,test4,,,,,
CONSOLE MESSAGE: line 21: %o
CONSOLE MESSAGE: line 22: %O
+CONSOLE MESSAGE: line 23: Test for zero "%f" in formatter
CONSOLE MESSAGE: line 54: /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i
CONSOLE MESSAGE: line 55: /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i
CONSOLE MESSAGE: line 54: /foo\\bar\sbaz/i
@@ -56,6 +57,7 @@
Array[10] console-format.html:20
Array[10] console-format.html:21
Array[10] console-format.html:22
+Test for zero "0" in formatter console-format.html:23
/^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i console-format.html:54
[/^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\…?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i] console-format.html:55
globals[0]
Modified: trunk/LayoutTests/inspector/console/console-format.html (143178 => 143179)
--- trunk/LayoutTests/inspector/console/console-format.html 2013-02-18 10:20:08 UTC (rev 143178)
+++ trunk/LayoutTests/inspector/console/console-format.html 2013-02-18 10:28:08 UTC (rev 143179)
@@ -20,7 +20,7 @@
console.log(array);
console.log("%o", array);
console.log("%O", array);
-
+ console.log("Test for zero \"%f\" in formatter", 0);
// Populate Globals
var regex1 = /^url\(\s*(?:(?:"(?:[^\\\"]|(?:\\[\da-f]{1,6}\s?|\.))*"|'(?:[^\\\']|(?:\\[\da-f]{1,6}\s?|\.))*')|(?:[!#$%&*-~\w]|(?:\\[\da-f]{1,6}\s?|\.))*)\s*\)/i;
var regex2 = new RegExp("foo\\\\bar\\sbaz", "i");
Modified: trunk/Source/WebCore/ChangeLog (143178 => 143179)
--- trunk/Source/WebCore/ChangeLog 2013-02-18 10:20:08 UTC (rev 143178)
+++ trunk/Source/WebCore/ChangeLog 2013-02-18 10:28:08 UTC (rev 143179)
@@ -1,3 +1,14 @@
+2013-02-18 Pavel Feldman <[email protected]>
+
+ Web Inspector: allow 0 as a formatted parameter in console message.
+ https://bugs.webkit.org/show_bug.cgi?id=110096
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/front-end/ConsoleMessage.js:
+ (WebInspector.ConsoleMessageImpl.prototype.append):
+ (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
+
2013-02-18 Ilya Tikhonovsky <[email protected]>
Unreviewed speculative fix for Chromium Mac.
Modified: trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js (143178 => 143179)
--- trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js 2013-02-18 10:20:08 UTC (rev 143178)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleMessage.js 2013-02-18 10:28:08 UTC (rev 143179)
@@ -548,8 +548,8 @@
{
if (b instanceof Node)
a.appendChild(b);
- else if (b) {
- var toAppend = WebInspector.linkifyStringAsFragment(b.toString());
+ else if (typeof b !== "undefined") {
+ var toAppend = WebInspector.linkifyStringAsFragment(String(b));
if (currentStyle) {
var wrapper = document.createElement('span');
for (var key in currentStyle)