<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[199635] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/199635">199635</a></dd>
<dt>Author</dt> <dd>mattbaker@apple.com</dd>
<dt>Date</dt> <dd>2016-04-16 18:26:07 -0700 (Sat, 16 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Adopt Number.prototype.toLocaleString For All Sizes and Times
https://bugs.webkit.org/show_bug.cgi?id=152033
&lt;rdar://problem/23815589&gt;

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

Update string formatters to localize float and percentage strings. Hook up
console message formatters to use String.standardFormatters so that console
statements (e.g. console.log(&quot;%.3f&quot;, 3.14159)) are properly formatted.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Utilities.js:
(value):
tokenizeFormatString should default to 6 digits when no precision
sub-specifier is provided.

percentageString should localize formatting, and take a fraction value
(0 to 1) instead of a percentage.

secondsToString should perform special-case formatting for zero values
(&quot;0ms&quot;) instead of the general purpose float formatter.

(value.d):
Switch to parseInt to floor floating point values and support numeric strings.
Return NaN instead of zero when passed a value that can't be converted to integer.

(value.f):
Switch to parseFloat to support numeric strings, and localize formatting.
Remove precision check, as it will never be less than zero. Return NaN
instead of zero when passed a value that can't be converted to float.

(prettyFunctionName):
Convert substitutions (an arguments object) to an array before calling join.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.floatFormatter):
Use String.standardFormatters.f.

(WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.integerFormatter):
Use String.standardFormatters.d.

* UserInterface/Views/LayoutTimelineDataGridNode.js:
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
(WebInspector.LayoutTimelineDataGridNode):
Use integer formatting for pixel values.

* UserInterface/Views/ProfileDataGridNode.js:
(WebInspector.ProfileDataGridNode.prototype._recalculateData):
(WebInspector.ProfileDataGridNode.prototype._totalTimeContent):
Treat percentage as a fraction from 0 to 1.

* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
Use integer formatting for pixel values.

LayoutTests:

Add test coverage for string formatters, and additional test cases for
Number.percentageString and Number.secondsToString.

* inspector/unit-tests/number-utilities-expected.txt:
* inspector/unit-tests/number-utilities.html:
* inspector/unit-tests/string-utilities-expected.txt: Added.
* inspector/unit-tests/string-utilities.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestsnumberutilitiesexpectedtxt">trunk/LayoutTests/inspector/unit-tests/number-utilities-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestsnumberutilitieshtml">trunk/LayoutTests/inspector/unit-tests/number-utilities.html</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseUtilitiesjs">trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsLayoutTimelineDataGridNodejs">trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineDataGridNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsProfileDataGridNodejs">trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsResourceDetailsSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsinspectorunittestsstringutilitiesexpectedtxt">trunk/LayoutTests/inspector/unit-tests/string-utilities-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorunittestsstringutilitieshtml">trunk/LayoutTests/inspector/unit-tests/string-utilities.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (199634 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-17 01:20:00 UTC (rev 199634)
+++ trunk/LayoutTests/ChangeLog        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-04-16  Matt Baker  &lt;mattbaker@apple.com&gt;
+
+        Web Inspector: Adopt Number.prototype.toLocaleString For All Sizes and Times
+        https://bugs.webkit.org/show_bug.cgi?id=152033
+        &lt;rdar://problem/23815589&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        Add test coverage for string formatters, and additional test cases for
+        Number.percentageString and Number.secondsToString.
+
+        * inspector/unit-tests/number-utilities-expected.txt:
+        * inspector/unit-tests/number-utilities.html:
+        * inspector/unit-tests/string-utilities-expected.txt: Added.
+        * inspector/unit-tests/string-utilities.html: Added.
+
</ins><span class="cx"> 2016-04-15  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Font Loading] Test promise gets rejected when unknown format used
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestsnumberutilitiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/unit-tests/number-utilities-expected.txt (199634 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/number-utilities-expected.txt        2016-04-17 01:20:00 UTC (rev 199634)
+++ trunk/LayoutTests/inspector/unit-tests/number-utilities-expected.txt        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -14,6 +14,7 @@
</span><span class="cx"> FAIL: constrain of NaN becomes min
</span><span class="cx"> 
</span><span class="cx"> -- Running test case: Number.secondsToString
</span><ins>+PASS: normal resolution of 0ms should be ms with no decimals
</ins><span class="cx"> PASS: normal resolution of sub 1ms should be ms
</span><span class="cx"> PASS: normal resolution of sub 10ms should be ms
</span><span class="cx"> PASS: normal resolution of sub 100ms should be ms
</span><span class="lines">@@ -25,6 +26,7 @@
</span><span class="cx"> PASS: normal resolution of greater than 1hr but sub 1 day should be hrs
</span><span class="cx"> PASS: normal resolution of greater than 1 day should be days
</span><span class="cx"> PASS: normal resolution of greater than 1 day should be days
</span><ins>+PASS: high resolution of 0ms should be ms with no decimals
</ins><span class="cx"> PASS: high resolution of sub 1ms should be ms with decimals
</span><span class="cx"> PASS: high resolution of sub 10ms should be ms with decimals
</span><span class="cx"> PASS: high resolution of sub 100ms should be ms with decimals
</span><span class="lines">@@ -46,3 +48,6 @@
</span><span class="cx"> PASS: high resolution of sub 10mb should be megabytes
</span><span class="cx"> PASS: high resolution of greater than 10mb should be megabytes
</span><span class="cx"> 
</span><ins>+-- Running test case: Number.percentageString
+PASS: precision should default to 1 if unspecified
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestsnumberutilitieshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/unit-tests/number-utilities.html (199634 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/number-utilities.html        2016-04-17 01:20:00 UTC (rev 199634)
+++ trunk/LayoutTests/inspector/unit-tests/number-utilities.html        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx">         name: &quot;Number.secondsToString&quot;,
</span><span class="cx">         test: () =&gt; {
</span><span class="cx">             // Normal resolution.
</span><ins>+            InspectorTest.expectThat(Number.secondsToString(0, false) === &quot;0ms&quot;, &quot;normal resolution of 0ms should be ms with no decimals&quot;);
</ins><span class="cx">             InspectorTest.expectThat(Number.secondsToString(0.000123456, false) === &quot;0.12ms&quot;, &quot;normal resolution of sub 1ms should be ms&quot;);
</span><span class="cx">             InspectorTest.expectThat(Number.secondsToString(0.00123456, false) === &quot;1.23ms&quot;, &quot;normal resolution of sub 10ms should be ms&quot;);
</span><span class="cx">             InspectorTest.expectThat(Number.secondsToString(0.0123456, false) === &quot;12.3ms&quot;, &quot;normal resolution of sub 100ms should be ms&quot;);
</span><span class="lines">@@ -45,6 +46,7 @@
</span><span class="cx">             InspectorTest.expectThat(Number.secondsToString(1234567, false) === &quot;14.3 days&quot;, &quot;normal resolution of greater than 1 day should be days&quot;);
</span><span class="cx"> 
</span><span class="cx">             // High resolution.
</span><ins>+            InspectorTest.expectThat(Number.secondsToString(0, true) === &quot;0ms&quot;, &quot;high resolution of 0ms should be ms with no decimals&quot;);
</ins><span class="cx">             InspectorTest.expectThat(Number.secondsToString(0.000123456, true) === &quot;0.123ms&quot;, &quot;high resolution of sub 1ms should be ms with decimals&quot;);
</span><span class="cx">             InspectorTest.expectThat(Number.secondsToString(0.00123456, true) === &quot;1.235ms&quot;, &quot;high resolution of sub 10ms should be ms with decimals&quot;);
</span><span class="cx">             InspectorTest.expectThat(Number.secondsToString(0.0123456, true) === &quot;12.35ms&quot;, &quot;high resolution of sub 100ms should be ms with decimals&quot;);
</span><span class="lines">@@ -82,6 +84,15 @@
</span><span class="cx">         }
</span><span class="cx">     });
</span><span class="cx"> 
</span><ins>+    suite.addTestCase({
+        name: &quot;Number.percentageString&quot;,
+        test: () =&gt; {
+            InspectorTest.expectThat(Number.percentageString(1 / 3) === &quot;33.3%&quot;, &quot;precision should default to 1 if unspecified&quot;);
+
+            return true;
+        }
+    });
+
</ins><span class="cx">     suite.runTestCasesAndFinish();
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestsstringutilitiesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/unit-tests/string-utilities-expected.txt (0 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/string-utilities-expected.txt                                (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/string-utilities-expected.txt        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+
+== Running test suite: StringUtilities
+-- Running test case: String.format
+PASS: float format specifier with no sub-specifier should show 6 decimal digits
+PASS: float format specifier with precision 0 should show 0 decimal digits
+PASS: float format specifier with precision 1 should show 1 decimal digit
+PASS: float format specifier with precision 2 should show 2 decimal digits
+PASS: float format specifier with precision 3 should show 3 decimal digits
+PASS: float format specifier with precision 4 should show 4 decimal digits
+PASS: float format specifier with precision 5 should show 5 decimal digits
+PASS: float format specifier with precision 6 should show 6 decimal digits
+PASS: float format specifier with precision 7 should show 7 decimal digits
+PASS: float format specifier with precision 8 should show 8 decimal digits
+PASS: float format specifier with precision 9 should show 9 decimal digits
+PASS: float format specifier with string argument should attempt conversion to float
+PASS: float format specifier with Infinity argument should show &quot;∞&quot;
+PASS: float format specifier with NaN argument should show &quot;NaN&quot;
+PASS: integer format specifier with float argument should convert to integer
+PASS: integer format specifier with string argument should attempt conversion to integer
+PASS: integer format specifier with Infinity argument should show &quot;NaN&quot;
+PASS: integer format specifier with NaN argument should show &quot;NaN&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectorunittestsstringutilitieshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/inspector/unit-tests/string-utilities.html (0 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/unit-tests/string-utilities.html                                (rev 0)
+++ trunk/LayoutTests/inspector/unit-tests/string-utilities.html        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../http/tests/inspector/resources/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function test()
+{
+    let suite = InspectorTest.createSyncSuite(&quot;StringUtilities&quot;);
+
+    suite.addTestCase({
+        name: &quot;String.format&quot;,
+        test: () =&gt; {
+            InspectorTest.expectThat(&quot;%f&quot;.format(1.23456789) === &quot;1.234568&quot;, &quot;float format specifier with no sub-specifier should show 6 decimal digits&quot;);
+            InspectorTest.expectThat(&quot;%.0f&quot;.format(1.23456789) === &quot;1&quot;, &quot;float format specifier with precision 0 should show 0 decimal digits&quot;);
+            InspectorTest.expectThat(&quot;%.1f&quot;.format(1.23456789) === &quot;1.2&quot;, &quot;float format specifier with precision 1 should show 1 decimal digit&quot;);
+            InspectorTest.expectThat(&quot;%.2f&quot;.format(1.23456789) === &quot;1.23&quot;, &quot;float format specifier with precision 2 should show 2 decimal digits&quot;);
+            InspectorTest.expectThat(&quot;%.3f&quot;.format(1.23456789) === &quot;1.235&quot;, &quot;float format specifier with precision 3 should show 3 decimal digits&quot;);
+            InspectorTest.expectThat(&quot;%.4f&quot;.format(1.23456789) === &quot;1.2346&quot;, &quot;float format specifier with precision 4 should show 4 decimal digits&quot;);
+            InspectorTest.expectThat(&quot;%.5f&quot;.format(1.23456789) === &quot;1.23457&quot;, &quot;float format specifier with precision 5 should show 5 decimal digits&quot;);
+            InspectorTest.expectThat(&quot;%.6f&quot;.format(1.23456789) === &quot;1.234568&quot;, &quot;float format specifier with precision 6 should show 6 decimal digits&quot;);
+            InspectorTest.expectThat(&quot;%.7f&quot;.format(1.23456789) === &quot;1.2345679&quot;, &quot;float format specifier with precision 7 should show 7 decimal digits&quot;);
+            InspectorTest.expectThat(&quot;%.8f&quot;.format(1.23456789) === &quot;1.23456789&quot;, &quot;float format specifier with precision 8 should show 8 decimal digits&quot;);
+            InspectorTest.expectThat(&quot;%.9f&quot;.format(1.23456789) === &quot;1.234567890&quot;, &quot;float format specifier with precision 9 should show 9 decimal digits&quot;);
+            InspectorTest.expectThat(&quot;%f&quot;.format(&quot;1.23456789&quot;) === &quot;1.234568&quot;, &quot;float format specifier with string argument should attempt conversion to float&quot;);
+            InspectorTest.expectThat(&quot;%f&quot;.format(Infinity) === &quot;\u221E&quot;, &quot;float format specifier with Infinity argument should show \&quot;\u221E\&quot;&quot;);
+            InspectorTest.expectThat(&quot;%f&quot;.format(NaN) === &quot;NaN&quot;, &quot;float format specifier with NaN argument should show \&quot;NaN\&quot;&quot;);
+
+            InspectorTest.expectThat(&quot;%d&quot;.format(137.1) === &quot;137&quot;, &quot;integer format specifier with float argument should convert to integer&quot;);
+            InspectorTest.expectThat(&quot;%d&quot;.format(&quot;137&quot;) === &quot;137&quot;, &quot;integer format specifier with string argument should attempt conversion to integer&quot;);
+            InspectorTest.expectThat(&quot;%d&quot;.format(Infinity) === &quot;NaN&quot;, &quot;integer format specifier with Infinity argument should show \&quot;NaN\&quot;&quot;);
+            InspectorTest.expectThat(&quot;%d&quot;.format(NaN) === &quot;NaN&quot;, &quot;integer format specifier with NaN argument should show \&quot;NaN\&quot;&quot;);
+            return true;
+        }
+    });
+
+    suite.runTestCasesAndFinish();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onLoad=&quot;runTest()&quot;&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (199634 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-04-17 01:20:00 UTC (rev 199634)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -1,5 +1,62 @@
</span><span class="cx"> 2016-04-16  Matt Baker  &lt;mattbaker@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Adopt Number.prototype.toLocaleString For All Sizes and Times
+        https://bugs.webkit.org/show_bug.cgi?id=152033
+        &lt;rdar://problem/23815589&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        Update string formatters to localize float and percentage strings. Hook up
+        console message formatters to use String.standardFormatters so that console
+        statements (e.g. console.log(&quot;%.3f&quot;, 3.14159)) are properly formatted.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Base/Utilities.js:
+        (value):
+        tokenizeFormatString should default to 6 digits when no precision
+        sub-specifier is provided.
+
+        percentageString should localize formatting, and take a fraction value
+        (0 to 1) instead of a percentage.
+
+        secondsToString should perform special-case formatting for zero values
+        (&quot;0ms&quot;) instead of the general purpose float formatter.
+
+        (value.d):
+        Switch to parseInt to floor floating point values and support numeric strings.
+        Return NaN instead of zero when passed a value that can't be converted to integer.
+
+        (value.f):
+        Switch to parseFloat to support numeric strings, and localize formatting.
+        Remove precision check, as it will never be less than zero. Return NaN
+        instead of zero when passed a value that can't be converted to float.
+
+        (prettyFunctionName):
+        Convert substitutions (an arguments object) to an array before calling join.
+
+        * UserInterface/Views/ConsoleMessageView.js:
+        (WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.floatFormatter):
+        Use String.standardFormatters.f.
+
+        (WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.integerFormatter):
+        Use String.standardFormatters.d.
+
+        * UserInterface/Views/LayoutTimelineDataGridNode.js:
+        (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
+        (WebInspector.LayoutTimelineDataGridNode):
+        Use integer formatting for pixel values.
+
+        * UserInterface/Views/ProfileDataGridNode.js:
+        (WebInspector.ProfileDataGridNode.prototype._recalculateData):
+        (WebInspector.ProfileDataGridNode.prototype._totalTimeContent):
+        Treat percentage as a fraction from 0 to 1.
+
+        * UserInterface/Views/ResourceDetailsSidebarPanel.js:
+        (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
+        Use integer formatting for pixel values.
+
+2016-04-16  Matt Baker  &lt;mattbaker@apple.com&gt;
+
</ins><span class="cx">         display:inline on the tbody is causing the width of the iframe to be shrunk to the minimum size of its text.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=15666
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (199634 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-04-17 01:20:00 UTC (rev 199634)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -23,8 +23,8 @@
</span><span class="cx"> localizedStrings[&quot;%d \xd7 %d pixels&quot;] = &quot;%d \xd7 %d pixels&quot;;
</span><span class="cx"> localizedStrings[&quot;%d \xd7 %d pixels (Natural: %d \xd7 %d pixels)&quot;] = &quot;%d \xd7 %d pixels (Natural: %d \xd7 %d pixels)&quot;;
</span><span class="cx"> localizedStrings[&quot;%d matches&quot;] = &quot;%d matches&quot;;
</span><del>-localizedStrings[&quot;%fpx&quot;] = &quot;%fpx&quot;;
-localizedStrings[&quot;%fpx\xB2&quot;] = &quot;%fpx\xB2&quot;;
</del><ins>+localizedStrings[&quot;%dpx&quot;] = &quot;%dpx&quot;;
+localizedStrings[&quot;%dpx\xB2&quot;] = &quot;%dpx\xB2&quot;;
</ins><span class="cx"> localizedStrings[&quot;%s (computed)&quot;] = &quot;%s (computed)&quot;;
</span><span class="cx"> localizedStrings[&quot;%s (default)&quot;] = &quot;%s (default)&quot;;
</span><span class="cx"> localizedStrings[&quot;%s (hidden)&quot;] = &quot;%s (hidden)&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseUtilitiesjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js (199634 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js        2016-04-17 01:20:00 UTC (rev 199634)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -640,15 +640,17 @@
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            var precision = -1;
</del><ins>+            const defaultPrecision = 6;
+
+            let precision = defaultPrecision;
</ins><span class="cx">             if (format[index] === &quot;.&quot;) {
</span><span class="cx">                 // This is a precision specifier. If no digit follows the &quot;.&quot;,
</span><del>-                // then the precision should be zero.
</del><ins>+                // then use the default precision of six digits (ISO C99 specification).
</ins><span class="cx">                 ++index;
</span><span class="cx"> 
</span><span class="cx">                 precision = parseInt(format.substring(index), 10);
</span><span class="cx">                 if (isNaN(precision))
</span><del>-                    precision = 0;
</del><ins>+                    precision = defaultPrecision;
</ins><span class="cx"> 
</span><span class="cx">                 while (!isNaN(format[index]))
</span><span class="cx">                     ++index;
</span><span class="lines">@@ -715,14 +717,21 @@
</span><span class="cx">     value: {
</span><span class="cx">         d: function(substitution)
</span><span class="cx">         {
</span><del>-            return !isNaN(substitution) ? substitution : 0;
</del><ins>+            return parseInt(substitution);
</ins><span class="cx">         },
</span><span class="cx"> 
</span><span class="cx">         f: function(substitution, token)
</span><span class="cx">         {
</span><del>-            if (substitution &amp;&amp; token.precision &gt; -1)
-                substitution = substitution.toFixed(token.precision);
-            return !isNaN(substitution) ? substitution : (token.precision &gt; -1 ? Number(0).toFixed(token.precision) : 0);
</del><ins>+            let value = parseFloat(substitution);
+            if (isNaN(value))
+                return NaN;
+
+            let options = {
+                minimumFractionDigits: token.precision,
+                maximumFractionDigits: token.precision,
+                useGrouping: false
+            };
+            return value.toLocaleString(undefined, options);
</ins><span class="cx">         },
</span><span class="cx"> 
</span><span class="cx">         s: function(substitution)
</span><span class="lines">@@ -741,7 +750,7 @@
</span><span class="cx"> 
</span><span class="cx">         function prettyFunctionName()
</span><span class="cx">         {
</span><del>-            return &quot;String.format(\&quot;&quot; + format + &quot;\&quot;, \&quot;&quot; + substitutions.join(&quot;\&quot;, \&quot;&quot;) + &quot;\&quot;)&quot;;
</del><ins>+            return &quot;String.format(\&quot;&quot; + format + &quot;\&quot;, \&quot;&quot; + Array.from(substitutions).join(&quot;\&quot;, \&quot;&quot;) + &quot;\&quot;)&quot;;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function warn(msg)
</span><span class="lines">@@ -912,10 +921,10 @@
</span><span class="cx"> 
</span><span class="cx"> Object.defineProperty(Number, &quot;percentageString&quot;,
</span><span class="cx"> {
</span><del>-    value: function(percent, precision = 1)
</del><ins>+    value: function(fraction, precision = 1)
</ins><span class="cx">     {
</span><del>-        console.assert(percent &gt;= 0 &amp;&amp; percent &lt;= 100);
-        return percent.toFixed(precision) + &quot;%&quot;;
</del><ins>+        console.assert(fraction &gt;= 0 &amp;&amp; fraction &lt;= 1);
+        return fraction.toLocaleString(undefined, {minimumFractionDigits: precision, style: &quot;percent&quot;});
</ins><span class="cx">     }
</span><span class="cx"> });
</span><span class="cx"> 
</span><span class="lines">@@ -936,6 +945,8 @@
</span><span class="cx">     value: function(seconds, higherResolution)
</span><span class="cx">     {
</span><span class="cx">         let ms = seconds * 1000;
</span><ins>+        if (!ms)
+            return WebInspector.UIString(&quot;%.0fms&quot;).format(0);
</ins><span class="cx"> 
</span><span class="cx">         if (Math.abs(ms) &lt; 10) {
</span><span class="cx">             if (higherResolution)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (199634 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js        2016-04-17 01:20:00 UTC (rev 199634)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -599,18 +599,16 @@
</span><span class="cx">             return obj.description;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        function floatFormatter(obj)
</del><ins>+        function floatFormatter(obj, token)
</ins><span class="cx">         {
</span><del>-            if (typeof obj.value !== &quot;number&quot;)
-                return parseFloat(obj.description);
-            return obj.value;
</del><ins>+            let value = typeof obj.value === &quot;number&quot; ? obj.value : obj.description;
+            return String.standardFormatters.f(value, token);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function integerFormatter(obj)
</span><span class="cx">         {
</span><del>-            if (typeof obj.value !== &quot;number&quot;)
-                return parseInt(obj.description);
-            return Math.floor(obj.value);
</del><ins>+            let value = typeof obj.value === &quot;number&quot; ? obj.value : obj.description;
+            return String.standardFormatters.d(value);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         var currentStyle = null;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsLayoutTimelineDataGridNodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineDataGridNode.js (199634 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineDataGridNode.js        2016-04-17 01:20:00 UTC (rev 199634)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineDataGridNode.js        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -68,10 +68,10 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;width&quot;:
</span><span class="cx">         case &quot;height&quot;:
</span><del>-            return isNaN(value) ? emDash : WebInspector.UIString(&quot;%fpx&quot;).format(value);
</del><ins>+            return isNaN(value) ? emDash : WebInspector.UIString(&quot;%dpx&quot;).format(value);
</ins><span class="cx"> 
</span><span class="cx">         case &quot;area&quot;:
</span><del>-            return isNaN(value) ? emDash : WebInspector.UIString(&quot;%fpx²&quot;).format(value);
</del><ins>+            return isNaN(value) ? emDash : WebInspector.UIString(&quot;%dpx²&quot;).format(value);
</ins><span class="cx"> 
</span><span class="cx">         case &quot;startTime&quot;:
</span><span class="cx">             return isNaN(value) ? emDash : Number.secondsToString(value - this._baseStartTime, true);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsProfileDataGridNodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js (199634 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js        2016-04-17 01:20:00 UTC (rev 199634)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -188,14 +188,14 @@
</span><span class="cx"> 
</span><span class="cx">         let totalTime = duration;
</span><span class="cx">         let selfTime = leafDuration + this._extraSelfTimeFromChargedChildren;
</span><del>-        let percent = (totalTime / this._tree.totalSampleTime) * 100;
</del><ins>+        let fraction = totalTime / this._tree.totalSampleTime;
</ins><span class="cx"> 
</span><del>-        this._data = {totalTime, selfTime, percent};
</del><ins>+        this._data = {totalTime, selfTime, fraction};
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _totalTimeContent()
</span><span class="cx">     {
</span><del>-        let {totalTime, percent} = this._data;
</del><ins>+        let {totalTime, fraction} = this._data;
</ins><span class="cx"> 
</span><span class="cx">         let fragment = document.createDocumentFragment();
</span><span class="cx">         let timeElement = fragment.appendChild(document.createElement(&quot;span&quot;));
</span><span class="lines">@@ -203,7 +203,7 @@
</span><span class="cx">         timeElement.textContent = Number.secondsToMillisecondsString(totalTime);
</span><span class="cx">         let percentElement = fragment.appendChild(document.createElement(&quot;span&quot;));
</span><span class="cx">         percentElement.classList.add(&quot;percentage&quot;);
</span><del>-        percentElement.textContent = Number.percentageString(percent);
</del><ins>+        percentElement.textContent = Number.percentageString(fraction);
</ins><span class="cx">         return fragment;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsResourceDetailsSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js (199634 => 199635)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js        2016-04-17 01:20:00 UTC (rev 199634)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js        2016-04-17 01:26:07 UTC (rev 199635)
</span><span class="lines">@@ -416,8 +416,8 @@
</span><span class="cx"> 
</span><span class="cx">         // Get the metrics for this resource and fill in the metrics rows with that information.
</span><span class="cx">         resource.getImageSize(function(size) {
</span><del>-            this._imageWidthRow.value = WebInspector.UIString(&quot;%fpx&quot;).format(size.width);
-            this._imageHeightRow.value = WebInspector.UIString(&quot;%fpx&quot;).format(size.height);
</del><ins>+            this._imageWidthRow.value = WebInspector.UIString(&quot;%dpx&quot;).format(size.width);
+            this._imageHeightRow.value = WebInspector.UIString(&quot;%dpx&quot;).format(size.height);
</ins><span class="cx">         }.bind(this));
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>