<!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>[242713] trunk/Source</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/242713">242713</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2019-03-11 10:11:13 -0700 (Mon, 11 Mar 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Specify fixed precision explicitly to prepare to change String::number and StringBuilder::appendNumber floating point behavior
https://bugs.webkit.org/show_bug.cgi?id=195533

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

* API/tests/ExecutionTimeLimitTest.cpp:
(testExecutionTimeLimit): Use appendFixedPrecisionNumber.
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToPrecision): Use numberToStringFixedPrecision.
* runtime/Options.cpp:
(JSC::Option::dump const): Use appendFixedPrecisionNumber.

Source/WebCore:

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::changeValueByStep): Use numberToStringFixedPrecision.
(WebCore::AccessibilityNodeObject::changeValueByPercent): Ditto.
* accessibility/AccessibilityScrollbar.cpp:
(WebCore::AccessibilityScrollbar::setValue): Ditto.
* css/CSSFontVariationValue.cpp:
(WebCore::CSSFontVariationValue::customCSSText const): Use appendFixedPrecisionNumber.
* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::customCSSText const): Ditto.
(WebCore::CSSRadialGradientValue::customCSSText const): Ditto.
* css/CSSKeyframeRule.cpp:
(WebCore::StyleRuleKeyframe::keyText const): Ditto.
* css/CSSTimingFunctionValue.cpp:
(WebCore::CSSCubicBezierTimingFunctionValue::customCSSText const): Ditto.
(WebCore::CSSSpringTimingFunctionValue::customCSSText const): Ditto.
* css/parser/CSSParserToken.cpp:
(WebCore::CSSParserToken::serialize const): Ditto.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::completeURLsInAttributeValue const): Ditto.
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::drawRulers): Use numberToStringFixedPrecision.
* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::toString const): Use appendFixedPrecisionNumber.
* page/PrintContext.cpp:
(WebCore::PrintContext::pageProperty): Use numberToStringFixedPrecision.
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::gcTimerString): Use numberToStringFixedPrecision.
* platform/LayoutUnit.h:
(WTF::ValueToString<WebCore::LayoutUnit>::string): Ditto.
* platform/graphics/Color.cpp:
(WebCore::Color::cssText const): Use appendFixedPrecisionNumber.
* platform/graphics/ExtendedColor.cpp:
(WebCore::ExtendedColor::cssText const): Ditto.
* svg/SVGAngleValue.cpp:
(WebCore::SVGAngleValue::valueAsString const): Use numberToStringFixedPrecision.
* svg/SVGNumberListValues.cpp:
(WebCore::SVGNumberListValues::valueAsString const): Use appendFixedPrecisionNumber.
* svg/SVGPathStringBuilder.cpp:
(WebCore::appendNumber): Ditto.
(WebCore::appendPoint): Ditto.
* svg/SVGPointListValues.cpp:
(WebCore::SVGPointListValues::valueAsString const): Ditto.
* svg/SVGTransformValue.cpp:
(WebCore::SVGTransformValue::valueAsString const): Ditto.
* svg/properties/SVGPropertyTraits.h:
(WebCore::SVGPropertyTraits<float>::toString): Use numberToStringFixedPrecision.
(WebCore::SVGPropertyTraits<FloatPoint>::toString): Use appendFixedPrecisionNumber.
(WebCore::SVGPropertyTraits<FloatRect>::toString): Ditto.
* testing/Internals.cpp:
(WebCore::Internals::dumpMarkerRects): Use appendFixedPrecisionNumber.
(WebCore::Internals::getCurrentCursorInfo): Ditto.
* xml/XPathValue.cpp:
(WebCore::XPath::Value::toString const): Use numberToStringFixedPrecision.

Source/WebKit:

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::dumpContentsToFile): Use appendFixedPrecisionNumber.
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::asJSON const): Ditto.
* Shared/Gamepad/GamepadData.cpp:
(WebKit::GamepadData::loggingString const): Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::logDiagnosticMessageWithValue): Use numberToStringFixedPrecision.

Source/WTF:

Soon, we will change String::number and StringBuilder::appendNumber for floating
point to use "shortest form" serialization instead of the current default, which is
"6-digit fixed precision stripping trailing zeros". To prepare to do this safely
without accidentally changing any behavior, changing callers to call the explicit
versions. Later, we may want to return and change many of them to use shortest form
instead, but that may require rebaselining tests, and in some extreme cases, getting
rid of flawed logic that converts between different single and double precision
floating point; such problems may be hidden by fixed precision serialization.

Since "shortest form" is already the behavior for AtomicString::number and
for makeString, no changes required for clients of either of those.

* wtf/Logger.h:
(WTF::LogArgument::toString): Use numberToStringFixedPrecision.
* wtf/MediaTime.cpp:
(WTF::MediaTime::toString const): Use appendFixedPrecisionNumber.
* wtf/text/ValueToString.h:
(WTF::ValueToString<float>::string): Use numberToStringFixedPrecision.
(WTF::ValueToString<double>::string): Ditto.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreAPItestsExecutionTimeLimitTestcpp">trunk/Source/JavaScriptCore/API/tests/ExecutionTimeLimitTest.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeNumberPrototypecpp">trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeOptionscpp">trunk/Source/JavaScriptCore/runtime/Options.cpp</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfLoggerh">trunk/Source/WTF/wtf/Logger.h</a></li>
<li><a href="#trunkSourceWTFwtfMediaTimecpp">trunk/Source/WTF/wtf/MediaTime.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextValueToStringh">trunk/Source/WTF/wtf/text/ValueToString.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityScrollbarcpp">trunk/Source/WebCore/accessibility/AccessibilityScrollbar.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontVariationValuecpp">trunk/Source/WebCore/css/CSSFontVariationValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSGradientValuecpp">trunk/Source/WebCore/css/CSSGradientValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSKeyframeRulecpp">trunk/Source/WebCore/css/CSSKeyframeRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSTimingFunctionValuecpp">trunk/Source/WebCore/css/CSSTimingFunctionValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSParserTokencpp">trunk/Source/WebCore/css/parser/CSSParserToken.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLImageElementcpp">trunk/Source/WebCore/html/HTMLImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorOverlaycpp">trunk/Source/WebCore/inspector/InspectorOverlay.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadStatisticscpp">trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePrintContextcpp">trunk/Source/WebCore/page/PrintContext.cpp</a></li>
<li><a href="#trunkSourceWebCorepagecocoaResourceUsageOverlayCocoamm">trunk/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformLayoutUnith">trunk/Source/WebCore/platform/LayoutUnit.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsColorcpp">trunk/Source/WebCore/platform/graphics/Color.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsExtendedColorcpp">trunk/Source/WebCore/platform/graphics/ExtendedColor.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAngleValuecpp">trunk/Source/WebCore/svg/SVGAngleValue.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGNumberListValuescpp">trunk/Source/WebCore/svg/SVGNumberListValues.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPathStringBuildercpp">trunk/Source/WebCore/svg/SVGPathStringBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPointListValuescpp">trunk/Source/WebCore/svg/SVGPointListValues.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTransformValuecpp">trunk/Source/WebCore/svg/SVGTransformValue.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGPropertyTraitsh">trunk/Source/WebCore/svg/properties/SVGPropertyTraits.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlXPathValuecpp">trunk/Source/WebCore/xml/XPathValue.cpp</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitNetworkProcesscacheNetworkCachecpp">trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcesscacheNetworkCacheEntrycpp">trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheEntry.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedGamepadGamepadDatacpp">trunk/Source/WebKit/Shared/Gamepad/GamepadData.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxycpp">trunk/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreAPItestsExecutionTimeLimitTestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/tests/ExecutionTimeLimitTest.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/tests/ExecutionTimeLimitTest.cpp 2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/JavaScriptCore/API/tests/ExecutionTimeLimitTest.cpp    2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx"> 
</span><span class="cx">             StringBuilder scriptBuilder;
</span><span class="cx">             scriptBuilder.appendLiteral("function foo() { var startTime = currentCPUTime(); while (true) { for (var i = 0; i < 1000; i++); if (currentCPUTime() - startTime > ");
</span><del>-            scriptBuilder.appendNumber(timeAfterWatchdogShouldHaveFired.seconds());
</del><ins>+            scriptBuilder.appendFixedPrecisionNumber(timeAfterWatchdogShouldHaveFired.seconds());
</ins><span class="cx">             scriptBuilder.appendLiteral(") break; } } foo();");
</span><span class="cx"> 
</span><span class="cx">             JSStringRef script = JSStringCreateWithUTF8CString(scriptBuilder.toString().utf8().data());
</span><span class="lines">@@ -235,7 +235,7 @@
</span><span class="cx">                                      "'use strict';"
</span><span class="cx">                                      "if (i % 1000 === 0) {"
</span><span class="cx">                                         "if (currentCPUTime() - startTime >");
</span><del>-            scriptBuilder.appendNumber(timeAfterWatchdogShouldHaveFired.seconds());
</del><ins>+            scriptBuilder.appendFixedPrecisionNumber(timeAfterWatchdogShouldHaveFired.seconds());
</ins><span class="cx">             scriptBuilder.appendLiteral("       ) { return; }");
</span><span class="cx">             scriptBuilder.appendLiteral("    }");
</span><span class="cx">             scriptBuilder.appendLiteral("    return recurse(i + 1); }");
</span><span class="lines">@@ -275,7 +275,7 @@
</span><span class="cx">             
</span><span class="cx">             StringBuilder scriptBuilder;
</span><span class="cx">             scriptBuilder.appendLiteral("function foo() { var startTime = currentCPUTime(); try { while (true) { for (var i = 0; i < 1000; i++); if (currentCPUTime() - startTime > ");
</span><del>-            scriptBuilder.appendNumber(timeAfterWatchdogShouldHaveFired.seconds());
</del><ins>+            scriptBuilder.appendFixedPrecisionNumber(timeAfterWatchdogShouldHaveFired.seconds());
</ins><span class="cx">             scriptBuilder.appendLiteral(") break; } } catch(e) { } } foo();");
</span><span class="cx"> 
</span><span class="cx">             JSStringRef script = JSStringCreateWithUTF8CString(scriptBuilder.toString().utf8().data());
</span><span class="lines">@@ -314,7 +314,7 @@
</span><span class="cx">             
</span><span class="cx">             StringBuilder scriptBuilder;
</span><span class="cx">             scriptBuilder.appendLiteral("function foo() { var startTime = currentCPUTime(); while (true) { for (var i = 0; i < 1000; i++); if (currentCPUTime() - startTime > ");
</span><del>-            scriptBuilder.appendNumber(timeAfterWatchdogShouldHaveFired.seconds());
</del><ins>+            scriptBuilder.appendFixedPrecisionNumber(timeAfterWatchdogShouldHaveFired.seconds());
</ins><span class="cx">             scriptBuilder.appendLiteral(") break; } } foo();");
</span><span class="cx">             
</span><span class="cx">             JSStringRef script = JSStringCreateWithUTF8CString(scriptBuilder.toString().utf8().data());
</span><span class="lines">@@ -353,7 +353,7 @@
</span><span class="cx">             
</span><span class="cx">             StringBuilder scriptBuilder;
</span><span class="cx">             scriptBuilder.appendLiteral("function foo() { var startTime = currentCPUTime(); while (true) { for (var i = 0; i < 1000; i++); if (currentCPUTime() - startTime > ");
</span><del>-            scriptBuilder.appendNumber(timeAfterWatchdogShouldHaveFired.seconds());
</del><ins>+            scriptBuilder.appendFixedPrecisionNumber(timeAfterWatchdogShouldHaveFired.seconds());
</ins><span class="cx">             scriptBuilder.appendLiteral(") break; } } foo();");
</span><span class="cx"> 
</span><span class="cx">             JSStringRef script = JSStringCreateWithUTF8CString(scriptBuilder.toString().utf8().data());
</span><span class="lines">@@ -392,7 +392,7 @@
</span><span class="cx"> 
</span><span class="cx">             StringBuilder scriptBuilder;
</span><span class="cx">             scriptBuilder.appendLiteral("function foo() { var startTime = currentCPUTime(); while (true) { for (var i = 0; i < 1000; i++); if (currentCPUTime() - startTime > ");
</span><del>-            scriptBuilder.appendNumber(maxBusyLoopTime.seconds()); // in seconds.
</del><ins>+            scriptBuilder.appendFixedPrecisionNumber(maxBusyLoopTime.seconds()); // in seconds.
</ins><span class="cx">             scriptBuilder.appendLiteral(") break; } } foo();");
</span><span class="cx"> 
</span><span class="cx">             JSStringRef script = JSStringCreateWithUTF8CString(scriptBuilder.toString().utf8().data());
</span><span class="lines">@@ -435,7 +435,7 @@
</span><span class="cx"> 
</span><span class="cx">             StringBuilder scriptBuilder;
</span><span class="cx">             scriptBuilder.appendLiteral("function foo() { var startTime = currentCPUTime(); while (true) { for (var i = 0; i < 1000; i++); if (currentCPUTime() - startTime > ");
</span><del>-            scriptBuilder.appendNumber(timeAfterWatchdogShouldHaveFired.seconds());
</del><ins>+            scriptBuilder.appendFixedPrecisionNumber(timeAfterWatchdogShouldHaveFired.seconds());
</ins><span class="cx">             scriptBuilder.appendLiteral(") break; } } foo();");
</span><span class="cx"> 
</span><span class="cx">             JSStringRef script = JSStringCreateWithUTF8CString(scriptBuilder.toString().utf8().data());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog    2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/JavaScriptCore/ChangeLog       2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2019-03-11  Darin Adler  <darin@apple.com>
+
+        Specify fixed precision explicitly to prepare to change String::number and StringBuilder::appendNumber floating point behavior
+        https://bugs.webkit.org/show_bug.cgi?id=195533
+
+        Reviewed by Brent Fulgham.
+
+        * API/tests/ExecutionTimeLimitTest.cpp:
+        (testExecutionTimeLimit): Use appendFixedPrecisionNumber.
+        * runtime/NumberPrototype.cpp:
+        (JSC::numberProtoFuncToPrecision): Use numberToStringFixedPrecision.
+        * runtime/Options.cpp:
+        (JSC::Option::dump const): Use appendFixedPrecisionNumber.
+
</ins><span class="cx"> 2019-03-10  Ross Kirsling  <ross.kirsling@sony.com>
</span><span class="cx"> 
</span><span class="cx">         Invalid flags in a RegExp literal should be an early SyntaxError
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeNumberPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp  2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp     2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -505,7 +505,7 @@
</span><span class="cx">     if (!inRange)
</span><span class="cx">         return throwVMError(exec, scope, createRangeError(exec, "toPrecision() argument must be between 1 and 21"_s));
</span><span class="cx"> 
</span><del>-    return JSValue::encode(jsString(exec, String::number(x, significantFigures, KeepTrailingZeros)));
</del><ins>+    return JSValue::encode(jsString(exec, String::numberToStringFixedPrecision(x, significantFigures, KeepTrailingZeros)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static ALWAYS_INLINE JSString* int32ToStringInternal(VM& vm, int32_t value, int32_t radix)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeOptionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Options.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Options.cpp  2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/JavaScriptCore/runtime/Options.cpp     2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -906,7 +906,7 @@
</span><span class="cx">         builder.appendNumber(m_entry.sizeVal);
</span><span class="cx">         break;
</span><span class="cx">     case Options::Type::doubleType:
</span><del>-        builder.appendNumber(m_entry.doubleVal);
</del><ins>+        builder.appendFixedPrecisionNumber(m_entry.doubleVal);
</ins><span class="cx">         break;
</span><span class="cx">     case Options::Type::int32Type:
</span><span class="cx">         builder.appendNumber(m_entry.int32Val);
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WTF/ChangeLog  2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2019-03-11  Darin Adler  <darin@apple.com>
+
+        Specify fixed precision explicitly to prepare to change String::number and StringBuilder::appendNumber floating point behavior
+        https://bugs.webkit.org/show_bug.cgi?id=195533
+
+        Reviewed by Brent Fulgham.
+
+        Soon, we will change String::number and StringBuilder::appendNumber for floating
+        point to use "shortest form" serialization instead of the current default, which is
+        "6-digit fixed precision stripping trailing zeros". To prepare to do this safely
+        without accidentally changing any behavior, changing callers to call the explicit
+        versions. Later, we may want to return and change many of them to use shortest form
+        instead, but that may require rebaselining tests, and in some extreme cases, getting
+        rid of flawed logic that converts between different single and double precision
+        floating point; such problems may be hidden by fixed precision serialization.
+
+        Since "shortest form" is already the behavior for AtomicString::number and
+        for makeString, no changes required for clients of either of those.
+
+        * wtf/Logger.h:
+        (WTF::LogArgument::toString): Use numberToStringFixedPrecision.
+        * wtf/MediaTime.cpp:
+        (WTF::MediaTime::toString const): Use appendFixedPrecisionNumber.
+        * wtf/text/ValueToString.h:
+        (WTF::ValueToString<float>::string): Use numberToStringFixedPrecision.
+        (WTF::ValueToString<double>::string): Ditto.
+
</ins><span class="cx"> 2019-03-11  Truitt Savell  <tsavell@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r242702.
</span></span></pre></div>
<a id="trunkSourceWTFwtfLoggerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Logger.h (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Logger.h    2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WTF/wtf/Logger.h       2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -36,8 +36,8 @@
</span><span class="cx">     template<typename U = T> static typename std::enable_if<std::is_same<U, unsigned>::value, String>::type toString(unsigned argument) { return String::number(argument); }
</span><span class="cx">     template<typename U = T> static typename std::enable_if<std::is_same<U, unsigned long>::value, String>::type toString(unsigned long argument) { return String::number(argument); }
</span><span class="cx">     template<typename U = T> static typename std::enable_if<std::is_same<U, long>::value, String>::type toString(long argument) { return String::number(argument); }
</span><del>-    template<typename U = T> static typename std::enable_if<std::is_same<U, float>::value, String>::type toString(float argument) { return String::number(argument); }
-    template<typename U = T> static typename std::enable_if<std::is_same<U, double>::value, String>::type toString(double argument) { return String::number(argument); }
</del><ins>+    template<typename U = T> static typename std::enable_if<std::is_same<U, float>::value, String>::type toString(float argument) { return String::numberToStringFixedPrecision(argument); }
+    template<typename U = T> static typename std::enable_if<std::is_same<U, double>::value, String>::type toString(double argument) { return String::numberToStringFixedPrecision(argument); }
</ins><span class="cx">     template<typename U = T> static typename std::enable_if<std::is_same<typename std::remove_reference<U>::type, AtomicString>::value, String>::type toString(const AtomicString& argument) { return argument.string(); }
</span><span class="cx">     template<typename U = T> static typename std::enable_if<std::is_same<typename std::remove_reference<U>::type, String>::value, String>::type toString(String argument) { return argument; }
</span><span class="cx">     template<typename U = T> static typename std::enable_if<std::is_same<typename std::remove_reference<U>::type, StringBuilder*>::value, String>::type toString(StringBuilder* argument) { return argument->toString(); }
</span></span></pre></div>
<a id="trunkSourceWTFwtfMediaTimecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/MediaTime.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/MediaTime.cpp       2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WTF/wtf/MediaTime.cpp  2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -593,7 +593,7 @@
</span><span class="cx">         builder.appendNumber(m_timeScale);
</span><span class="cx">         builder.appendLiteral(" = ");
</span><span class="cx">     }
</span><del>-    builder.appendNumber(toDouble());
</del><ins>+    builder.appendFixedPrecisionNumber(toDouble());
</ins><span class="cx">     builder.append('}');
</span><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWTFwtftextValueToStringh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/ValueToString.h (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/ValueToString.h        2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WTF/wtf/text/ValueToString.h   2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -35,22 +35,18 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><del>-template<class T>
-struct ValueToString;
</del><ins>+template<typename> struct ValueToString;
</ins><span class="cx"> 
</span><del>-template <>
-struct ValueToString<int> {
-    static String string(const int value) { return String::number(value); }
</del><ins>+template<> struct ValueToString<int> {
+    static String string(int value) { return String::number(value); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-template <>
-struct ValueToString<float> {
-    static String string(const float value) { return String::number(value); }
</del><ins>+template<> struct ValueToString<float> {
+    static String string(float value) { return String::numberToStringFixedPrecision(value); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-template <>
-struct ValueToString<double> {
-    static String string(const double value) { return String::number(value); }
</del><ins>+template<> struct ValueToString<double> {
+    static String string(double value) { return String::numberToStringFixedPrecision(value); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WTF
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/ChangeLog      2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -1,3 +1,64 @@
</span><ins>+2019-03-11  Darin Adler  <darin@apple.com>
+
+        Specify fixed precision explicitly to prepare to change String::number and StringBuilder::appendNumber floating point behavior
+        https://bugs.webkit.org/show_bug.cgi?id=195533
+
+        Reviewed by Brent Fulgham.
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::changeValueByStep): Use numberToStringFixedPrecision.
+        (WebCore::AccessibilityNodeObject::changeValueByPercent): Ditto.
+        * accessibility/AccessibilityScrollbar.cpp:
+        (WebCore::AccessibilityScrollbar::setValue): Ditto.
+        * css/CSSFontVariationValue.cpp:
+        (WebCore::CSSFontVariationValue::customCSSText const): Use appendFixedPrecisionNumber.
+        * css/CSSGradientValue.cpp:
+        (WebCore::CSSLinearGradientValue::customCSSText const): Ditto.
+        (WebCore::CSSRadialGradientValue::customCSSText const): Ditto.
+        * css/CSSKeyframeRule.cpp:
+        (WebCore::StyleRuleKeyframe::keyText const): Ditto.
+        * css/CSSTimingFunctionValue.cpp:
+        (WebCore::CSSCubicBezierTimingFunctionValue::customCSSText const): Ditto.
+        (WebCore::CSSSpringTimingFunctionValue::customCSSText const): Ditto.
+        * css/parser/CSSParserToken.cpp:
+        (WebCore::CSSParserToken::serialize const): Ditto.
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::completeURLsInAttributeValue const): Ditto.
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::InspectorOverlay::drawRulers): Use numberToStringFixedPrecision.
+        * loader/ResourceLoadStatistics.cpp:
+        (WebCore::ResourceLoadStatistics::toString const): Use appendFixedPrecisionNumber.
+        * page/PrintContext.cpp:
+        (WebCore::PrintContext::pageProperty): Use numberToStringFixedPrecision.
+        * page/cocoa/ResourceUsageOverlayCocoa.mm:
+        (WebCore::gcTimerString): Use numberToStringFixedPrecision.
+        * platform/LayoutUnit.h:
+        (WTF::ValueToString<WebCore::LayoutUnit>::string): Ditto.
+        * platform/graphics/Color.cpp:
+        (WebCore::Color::cssText const): Use appendFixedPrecisionNumber.
+        * platform/graphics/ExtendedColor.cpp:
+        (WebCore::ExtendedColor::cssText const): Ditto.
+        * svg/SVGAngleValue.cpp:
+        (WebCore::SVGAngleValue::valueAsString const): Use numberToStringFixedPrecision.
+        * svg/SVGNumberListValues.cpp:
+        (WebCore::SVGNumberListValues::valueAsString const): Use appendFixedPrecisionNumber.
+        * svg/SVGPathStringBuilder.cpp:
+        (WebCore::appendNumber): Ditto.
+        (WebCore::appendPoint): Ditto.
+        * svg/SVGPointListValues.cpp:
+        (WebCore::SVGPointListValues::valueAsString const): Ditto.
+        * svg/SVGTransformValue.cpp:
+        (WebCore::SVGTransformValue::valueAsString const): Ditto.
+        * svg/properties/SVGPropertyTraits.h:
+        (WebCore::SVGPropertyTraits<float>::toString): Use numberToStringFixedPrecision.
+        (WebCore::SVGPropertyTraits<FloatPoint>::toString): Use appendFixedPrecisionNumber.
+        (WebCore::SVGPropertyTraits<FloatRect>::toString): Ditto.
+        * testing/Internals.cpp:
+        (WebCore::Internals::dumpMarkerRects): Use appendFixedPrecisionNumber.
+        (WebCore::Internals::getCurrentCursorInfo): Ditto.
+        * xml/XPathValue.cpp:
+        (WebCore::XPath::Value::toString const): Use numberToStringFixedPrecision.
+
</ins><span class="cx"> 2019-03-11  Philippe Normand  <pnormand@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, Non-GStreamer-GL build fix after r242701.
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp   2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp      2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -1098,7 +1098,7 @@
</span><span class="cx"> 
</span><span class="cx">     value += increase ? step : -step;
</span><span class="cx"> 
</span><del>-    setValue(String::number(value));
</del><ins>+    setValue(String::numberToStringFixedPrecision(value));
</ins><span class="cx"> 
</span><span class="cx">     axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged);
</span><span class="cx"> }
</span><span class="lines">@@ -1110,11 +1110,11 @@
</span><span class="cx">     float value = valueForRange();
</span><span class="cx"> 
</span><span class="cx">     // Make sure the specified percent will cause a change of one integer step or larger.
</span><del>-    if (fabs(step) < 1)
-        step = fabs(percentChange) * (1 / percentChange);
</del><ins>+    if (std::abs(step) < 1)
+        step = std::abs(percentChange) * (1 / percentChange);
</ins><span class="cx"> 
</span><span class="cx">     value += step;
</span><del>-    setValue(String::number(value));
</del><ins>+    setValue(String::numberToStringFixedPrecision(value));
</ins><span class="cx"> 
</span><span class="cx">     axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityScrollbarcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityScrollbar.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityScrollbar.cpp    2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/accessibility/AccessibilityScrollbar.cpp       2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     float newValue = value * m_scrollbar->maximum();
</span><del>-    if (dispatchAccessibleSetValueEvent(String::number(newValue)))
</del><ins>+    if (dispatchAccessibleSetValueEvent(String::numberToStringFixedPrecision(newValue)))
</ins><span class="cx">         return;
</span><span class="cx">     m_scrollbar->scrollableArea().scrollToOffsetWithoutAnimation(m_scrollbar->orientation(), newValue);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontVariationValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontVariationValue.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontVariationValue.cpp       2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/css/CSSFontVariationValue.cpp  2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     for (char c : m_tag)
</span><span class="cx">         builder.append(c);
</span><span class="cx">     builder.appendLiteral("\" ");
</span><del>-    builder.appendNumber(m_value);
</del><ins>+    builder.appendFixedPrecisionNumber(m_value);
</ins><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGradientValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGradientValue.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGradientValue.cpp    2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/css/CSSGradientValue.cpp       2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -693,7 +693,7 @@
</span><span class="cx">                 result.append(')');
</span><span class="cx">             } else {
</span><span class="cx">                 result.appendLiteral("color-stop(");
</span><del>-                result.appendNumber(position);
</del><ins>+                result.appendFixedPrecisionNumber(position);
</ins><span class="cx">                 result.appendLiteral(", ");
</span><span class="cx">                 result.append(stop.m_color->cssText());
</span><span class="cx">                 result.append(')');
</span><span class="lines">@@ -974,7 +974,7 @@
</span><span class="cx">                 result.append(')');
</span><span class="cx">             } else {
</span><span class="cx">                 result.appendLiteral("color-stop(");
</span><del>-                result.appendNumber(position);
</del><ins>+                result.appendFixedPrecisionNumber(position);
</ins><span class="cx">                 result.appendLiteral(", ");
</span><span class="cx">                 result.append(stop.m_color->cssText());
</span><span class="cx">                 result.append(')');
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSKeyframeRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSKeyframeRule.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSKeyframeRule.cpp     2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/css/CSSKeyframeRule.cpp        2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     for (size_t i = 0; i < m_keys.size(); ++i) {
</span><span class="cx">         if (i)
</span><span class="cx">             keyText.append(',');
</span><del>-        keyText.appendNumber(m_keys.at(i) * 100);
</del><ins>+        keyText.appendFixedPrecisionNumber(m_keys.at(i) * 100);
</ins><span class="cx">         keyText.append('%');
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSTimingFunctionValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSTimingFunctionValue.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSTimingFunctionValue.cpp      2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/css/CSSTimingFunctionValue.cpp 2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -34,13 +34,13 @@
</span><span class="cx"> {
</span><span class="cx">     StringBuilder builder;
</span><span class="cx">     builder.appendLiteral("cubic-bezier(");
</span><del>-    builder.appendNumber(m_x1);
</del><ins>+    builder.appendFixedPrecisionNumber(m_x1);
</ins><span class="cx">     builder.appendLiteral(", ");
</span><del>-    builder.appendNumber(m_y1);
</del><ins>+    builder.appendFixedPrecisionNumber(m_y1);
</ins><span class="cx">     builder.appendLiteral(", ");
</span><del>-    builder.appendNumber(m_x2);
</del><ins>+    builder.appendFixedPrecisionNumber(m_x2);
</ins><span class="cx">     builder.appendLiteral(", ");
</span><del>-    builder.appendNumber(m_y2);
</del><ins>+    builder.appendFixedPrecisionNumber(m_y2);
</ins><span class="cx">     builder.append(')');    
</span><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="lines">@@ -71,13 +71,13 @@
</span><span class="cx"> {
</span><span class="cx">     StringBuilder builder;
</span><span class="cx">     builder.appendLiteral("spring(");
</span><del>-    builder.appendNumber(m_mass);
</del><ins>+    builder.appendFixedPrecisionNumber(m_mass);
</ins><span class="cx">     builder.append(' ');
</span><del>-    builder.appendNumber(m_stiffness);
</del><ins>+    builder.appendFixedPrecisionNumber(m_stiffness);
</ins><span class="cx">     builder.append(' ');
</span><del>-    builder.appendNumber(m_damping);
</del><ins>+    builder.appendFixedPrecisionNumber(m_damping);
</ins><span class="cx">     builder.append(' ');
</span><del>-    builder.appendNumber(m_initialVelocity);
</del><ins>+    builder.appendFixedPrecisionNumber(m_initialVelocity);
</ins><span class="cx">     builder.append(')');
</span><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSParserTokencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSParserToken.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSParserToken.cpp       2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/css/parser/CSSParserToken.cpp  2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -419,15 +419,15 @@
</span><span class="cx">         // These won't properly preserve the NumericValueType flag
</span><span class="cx">         if (m_numericSign == PlusSign)
</span><span class="cx">             builder.append('+');
</span><del>-        builder.appendNumber(numericValue());
</del><ins>+        builder.appendFixedPrecisionNumber(numericValue());
</ins><span class="cx">         break;
</span><span class="cx">     case PercentageToken:
</span><del>-        builder.appendNumber(numericValue());
</del><ins>+        builder.appendFixedPrecisionNumber(numericValue());
</ins><span class="cx">         builder.append('%');
</span><span class="cx">         break;
</span><span class="cx">     case DimensionToken:
</span><span class="cx">         // This will incorrectly serialize e.g. 4e3e2 as 4000e2
</span><del>-        builder.appendNumber(numericValue());
</del><ins>+        builder.appendFixedPrecisionNumber(numericValue());
</ins><span class="cx">         serializeIdentifier(value().toString(), builder);
</span><span class="cx">         break;
</span><span class="cx">     case UnicodeRangeToken:
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLImageElement.cpp   2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp      2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -551,7 +551,7 @@
</span><span class="cx">             result.append(URL(base, candidate.string.toString()).string());
</span><span class="cx">             if (candidate.density != UninitializedDescriptor) {
</span><span class="cx">                 result.append(' ');
</span><del>-                result.appendNumber(candidate.density);
</del><ins>+                result.appendFixedPrecisionNumber(candidate.density);
</ins><span class="cx">                 result.append('x');
</span><span class="cx">             }
</span><span class="cx">             if (candidate.resourceWidth != UninitializedDescriptor) {
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorOverlaycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp      2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -782,7 +782,7 @@
</span><span class="cx"> 
</span><span class="cx">                 GraphicsContextStateSaver verticalLabelStateSaver(context);
</span><span class="cx">                 context.translate(zoom(x) + 0.5f, scrollY);
</span><del>-                context.drawText(font, TextRun(String::number(x)), { 2, rulerLabelSize });
</del><ins>+                context.drawText(font, TextRun(String::numberToStringFixedPrecision(x)), { 2, rulerLabelSize });
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             for (float y = multipleBelow(minY, rulerStepIncrement * 2); y < maxY; y += rulerStepIncrement * 2) {
</span><span class="lines">@@ -792,7 +792,7 @@
</span><span class="cx">                 GraphicsContextStateSaver horizontalLabelStateSaver(context);
</span><span class="cx">                 context.translate(scrollX, zoom(y) + 0.5f);
</span><span class="cx">                 context.rotate(-piOverTwoFloat);
</span><del>-                context.drawText(font, TextRun(String::number(y)), { 2, rulerLabelSize });
</del><ins>+                context.drawText(font, TextRun(String::numberToStringFixedPrecision(y)), { 2, rulerLabelSize });
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadStatisticscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp   2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp      2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -412,7 +412,7 @@
</span><span class="cx">     builder.append(registrableDomain.string());
</span><span class="cx">     builder.append('\n');
</span><span class="cx">     builder.appendLiteral("    lastSeen: ");
</span><del>-    builder.appendNumber(lastSeen.secondsSinceEpoch().value());
</del><ins>+    builder.appendFixedPrecisionNumber(lastSeen.secondsSinceEpoch().value());
</ins><span class="cx">     builder.append('\n');
</span><span class="cx">     
</span><span class="cx">     // User interaction
</span><span class="lines">@@ -419,7 +419,7 @@
</span><span class="cx">     appendBoolean(builder, "hadUserInteraction", hadUserInteraction);
</span><span class="cx">     builder.append('\n');
</span><span class="cx">     builder.appendLiteral("    mostRecentUserInteraction: ");
</span><del>-    builder.appendNumber(mostRecentUserInteractionTime.secondsSinceEpoch().value());
</del><ins>+    builder.appendFixedPrecisionNumber(mostRecentUserInteractionTime.secondsSinceEpoch().value());
</ins><span class="cx">     builder.append('\n');
</span><span class="cx">     appendBoolean(builder, "grandfathered", grandfathered);
</span><span class="cx">     builder.append('\n');
</span></span></pre></div>
<a id="trunkSourceWebCorepagePrintContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PrintContext.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PrintContext.cpp       2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/page/PrintContext.cpp  2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -326,10 +326,10 @@
</span><span class="cx">     if (!strcmp(propertyName, "margin-left")) {
</span><span class="cx">         if (style->marginLeft().isAuto())
</span><span class="cx">             return "auto"_s;
</span><del>-        return String::number(style->marginLeft().value());
</del><ins>+        return String::numberToStringFixedPrecision(style->marginLeft().value());
</ins><span class="cx">     }
</span><span class="cx">     if (!strcmp(propertyName, "line-height"))
</span><del>-        return String::number(style->lineHeight().value());
</del><ins>+        return String::numberToStringFixedPrecision(style->lineHeight().value());
</ins><span class="cx">     if (!strcmp(propertyName, "font-size"))
</span><span class="cx">         return String::number(style->fontDescription().computedPixelSize());
</span><span class="cx">     if (!strcmp(propertyName, "font-family"))
</span></span></pre></div>
<a id="trunkSourceWebCorepagecocoaResourceUsageOverlayCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm     2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm        2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -439,7 +439,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (std::isnan(timerFireDate))
</span><span class="cx">         return "[not scheduled]"_s;
</span><del>-    return String::number((timerFireDate - now).seconds());
</del><ins>+    return String::numberToStringFixedPrecision((timerFireDate - now).seconds());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ResourceUsageOverlay::platformDraw(CGContextRef context)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLayoutUnith"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LayoutUnit.h (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LayoutUnit.h       2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/platform/LayoutUnit.h  2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -833,12 +833,14 @@
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><ins>+
</ins><span class="cx"> namespace WTF {
</span><ins>+
</ins><span class="cx"> // This structure is used by PODIntervalTree for debugging.
</span><del>-template <>
-struct ValueToString<WebCore::LayoutUnit> {
-    static String string(const WebCore::LayoutUnit value) { return String::number(value.toFloat()); }
</del><ins>+template<> struct ValueToString<WebCore::LayoutUnit> {
+    static String string(WebCore::LayoutUnit value) { return String::numberToStringFixedPrecision(value.toFloat()); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WTF
</span><ins>+
</ins><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsColorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Color.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Color.cpp 2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/platform/graphics/Color.cpp    2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -377,7 +377,7 @@
</span><span class="cx">     builder.appendNumber(static_cast<unsigned char>(blue()));
</span><span class="cx">     if (colorHasAlpha) {
</span><span class="cx">         builder.appendLiteral(", ");
</span><del>-        builder.appendNumber(alpha() / 255.0f);
</del><ins>+        builder.appendFixedPrecisionNumber(alpha() / 255.0f);
</ins><span class="cx">     }
</span><span class="cx">         
</span><span class="cx">     builder.append(')');
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsExtendedColorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ExtendedColor.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ExtendedColor.cpp 2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/platform/graphics/ExtendedColor.cpp    2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -56,16 +56,16 @@
</span><span class="cx">         return WTF::emptyString();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    builder.appendNumber(red());
</del><ins>+    builder.appendFixedPrecisionNumber(red());
</ins><span class="cx">     builder.append(' ');
</span><span class="cx"> 
</span><del>-    builder.appendNumber(green());
</del><ins>+    builder.appendFixedPrecisionNumber(green());
</ins><span class="cx">     builder.append(' ');
</span><span class="cx"> 
</span><del>-    builder.appendNumber(blue());
</del><ins>+    builder.appendFixedPrecisionNumber(blue());
</ins><span class="cx">     if (!WTF::areEssentiallyEqual(alpha(), 1.0f)) {
</span><span class="cx">         builder.appendLiteral(" / ");
</span><del>-        builder.appendNumber(alpha());
</del><ins>+        builder.appendFixedPrecisionNumber(alpha());
</ins><span class="cx">     }
</span><span class="cx">     builder.append(')');
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAngleValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAngleValue.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAngleValue.cpp       2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/svg/SVGAngleValue.cpp  2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">         return makeString(FormattedNumber::fixedPrecision(m_valueInSpecifiedUnits), "grad");
</span><span class="cx">     case SVG_ANGLETYPE_UNSPECIFIED:
</span><span class="cx">     case SVG_ANGLETYPE_UNKNOWN:
</span><del>-        return String::number(m_valueInSpecifiedUnits);
</del><ins>+        return String::numberToStringFixedPrecision(m_valueInSpecifiedUnits);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGNumberListValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGNumberListValues.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGNumberListValues.cpp 2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/svg/SVGNumberListValues.cpp    2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">         if (i > 0)
</span><span class="cx">             builder.append(' ');
</span><span class="cx"> 
</span><del>-        builder.appendNumber(at(i));
</del><ins>+        builder.appendFixedPrecisionNumber(at(i));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return builder.toString();
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPathStringBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPathStringBuilder.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPathStringBuilder.cpp        2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/svg/SVGPathStringBuilder.cpp   2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -57,15 +57,15 @@
</span><span class="cx"> 
</span><span class="cx"> static void appendNumber(StringBuilder& stringBuilder, float number)
</span><span class="cx"> {
</span><del>-    stringBuilder.appendNumber(number);
</del><ins>+    stringBuilder.appendFixedPrecisionNumber(number);
</ins><span class="cx">     stringBuilder.append(' ');
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void appendPoint(StringBuilder& stringBuilder, const FloatPoint& point)
</span><span class="cx"> {
</span><del>-    stringBuilder.appendNumber(point.x());
</del><ins>+    stringBuilder.appendFixedPrecisionNumber(point.x());
</ins><span class="cx">     stringBuilder.append(' ');
</span><del>-    stringBuilder.appendNumber(point.y());
</del><ins>+    stringBuilder.appendFixedPrecisionNumber(point.y());
</ins><span class="cx">     stringBuilder.append(' ');
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPointListValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPointListValues.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPointListValues.cpp  2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/svg/SVGPointListValues.cpp     2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -36,9 +36,9 @@
</span><span class="cx">             builder.append(' '); // FIXME: Shouldn't we use commas to seperate?
</span><span class="cx"> 
</span><span class="cx">         const auto& point = at(i);
</span><del>-        builder.appendNumber(point.x());
</del><ins>+        builder.appendFixedPrecisionNumber(point.x());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(point.y());
</del><ins>+        builder.appendFixedPrecisionNumber(point.y());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return builder.toString();
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTransformValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTransformValue.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTransformValue.cpp   2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/svg/SVGTransformValue.cpp      2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -167,17 +167,17 @@
</span><span class="cx">     case SVG_TRANSFORM_MATRIX: {
</span><span class="cx">         StringBuilder builder;
</span><span class="cx">         builder.append(prefix);
</span><del>-        builder.appendNumber(m_matrix.a());
</del><ins>+        builder.appendFixedPrecisionNumber(m_matrix.a());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(m_matrix.b());
</del><ins>+        builder.appendFixedPrecisionNumber(m_matrix.b());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(m_matrix.c());
</del><ins>+        builder.appendFixedPrecisionNumber(m_matrix.c());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(m_matrix.d());
</del><ins>+        builder.appendFixedPrecisionNumber(m_matrix.d());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(m_matrix.e());
</del><ins>+        builder.appendFixedPrecisionNumber(m_matrix.e());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(m_matrix.f());
</del><ins>+        builder.appendFixedPrecisionNumber(m_matrix.f());
</ins><span class="cx">         builder.append(')');
</span><span class="cx">         return builder.toString();
</span><span class="cx">     }
</span><span class="lines">@@ -184,9 +184,9 @@
</span><span class="cx">     case SVG_TRANSFORM_TRANSLATE: {
</span><span class="cx">         StringBuilder builder;
</span><span class="cx">         builder.append(prefix);
</span><del>-        builder.appendNumber(m_matrix.e());
</del><ins>+        builder.appendFixedPrecisionNumber(m_matrix.e());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(m_matrix.f());
</del><ins>+        builder.appendFixedPrecisionNumber(m_matrix.f());
</ins><span class="cx">         builder.append(')');
</span><span class="cx">         return builder.toString();
</span><span class="cx">     }
</span><span class="lines">@@ -193,9 +193,9 @@
</span><span class="cx">     case SVG_TRANSFORM_SCALE: {
</span><span class="cx">         StringBuilder builder;
</span><span class="cx">         builder.append(prefix);
</span><del>-        builder.appendNumber(m_matrix.xScale());
</del><ins>+        builder.appendFixedPrecisionNumber(m_matrix.xScale());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(m_matrix.yScale());
</del><ins>+        builder.appendFixedPrecisionNumber(m_matrix.yScale());
</ins><span class="cx">         builder.append(')');
</span><span class="cx">         return builder.toString();
</span><span class="cx">     }
</span><span class="lines">@@ -207,12 +207,12 @@
</span><span class="cx">         float cy = narrowPrecisionToFloat(cosAngle != 1 ? (m_matrix.e() * sinAngle / (1 - cosAngle) + m_matrix.f()) / 2 : 0);
</span><span class="cx">         StringBuilder builder;
</span><span class="cx">         builder.append(prefix);
</span><del>-        builder.appendNumber(m_angle);
</del><ins>+        builder.appendFixedPrecisionNumber(m_angle);
</ins><span class="cx">         if (cx || cy) {
</span><span class="cx">             builder.append(' ');
</span><del>-            builder.appendNumber(cx);
</del><ins>+            builder.appendFixedPrecisionNumber(cx);
</ins><span class="cx">             builder.append(' ');
</span><del>-            builder.appendNumber(cy);
</del><ins>+            builder.appendFixedPrecisionNumber(cy);
</ins><span class="cx">         }
</span><span class="cx">         builder.append(')');
</span><span class="cx">         return builder.toString();
</span><span class="lines">@@ -221,7 +221,7 @@
</span><span class="cx">     case SVG_TRANSFORM_SKEWY: {
</span><span class="cx">         StringBuilder builder;
</span><span class="cx">         builder.append(prefix);
</span><del>-        builder.appendNumber(m_angle);
</del><ins>+        builder.appendFixedPrecisionNumber(m_angle);
</ins><span class="cx">         builder.append(')');
</span><span class="cx">         return builder.toString();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGPropertyTraitsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/properties/SVGPropertyTraits.h (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGPropertyTraits.h  2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/svg/properties/SVGPropertyTraits.h     2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx">             return WTF::nullopt;
</span><span class="cx">         return number;
</span><span class="cx">     }
</span><del>-    static String toString(float type) { return String::number(type); }
</del><ins>+    static String toString(float type) { return String::numberToStringFixedPrecision(type); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template<>
</span><span class="lines">@@ -140,9 +140,9 @@
</span><span class="cx">     static String toString(const FloatPoint& type)
</span><span class="cx">     {
</span><span class="cx">         StringBuilder builder;
</span><del>-        builder.appendNumber(type.x());
</del><ins>+        builder.appendFixedPrecisionNumber(type.x());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(type.y());
</del><ins>+        builder.appendFixedPrecisionNumber(type.y());
</ins><span class="cx">         return builder.toString();
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="lines">@@ -167,13 +167,13 @@
</span><span class="cx">     static String toString(const FloatRect& type)
</span><span class="cx">     {
</span><span class="cx">         StringBuilder builder;
</span><del>-        builder.appendNumber(type.x());
</del><ins>+        builder.appendFixedPrecisionNumber(type.x());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(type.y());
</del><ins>+        builder.appendFixedPrecisionNumber(type.y());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(type.width());
</del><ins>+        builder.appendFixedPrecisionNumber(type.width());
</ins><span class="cx">         builder.append(' ');
</span><del>-        builder.appendNumber(type.height());
</del><ins>+        builder.appendFixedPrecisionNumber(type.height());
</ins><span class="cx">         return builder.toString();
</span><span class="cx">     }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp       2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/testing/Internals.cpp  2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -1606,13 +1606,13 @@
</span><span class="cx">     rectString.appendLiteral("marker rects: ");
</span><span class="cx">     for (const auto& rect : rects) {
</span><span class="cx">         rectString.append('(');
</span><del>-        rectString.appendNumber(rect.x());
</del><ins>+        rectString.appendFixedPrecisionNumber(rect.x());
</ins><span class="cx">         rectString.appendLiteral(", ");
</span><del>-        rectString.appendNumber(rect.y());
</del><ins>+        rectString.appendFixedPrecisionNumber(rect.y());
</ins><span class="cx">         rectString.appendLiteral(", ");
</span><del>-        rectString.appendNumber(rect.width());
</del><ins>+        rectString.appendFixedPrecisionNumber(rect.width());
</ins><span class="cx">         rectString.appendLiteral(", ");
</span><del>-        rectString.appendNumber(rect.height());
</del><ins>+        rectString.appendFixedPrecisionNumber(rect.height());
</ins><span class="cx">         rectString.appendLiteral(") ");
</span><span class="cx">     }
</span><span class="cx">     return rectString.toString();
</span><span class="lines">@@ -3328,14 +3328,14 @@
</span><span class="cx">     if (cursor.image()) {
</span><span class="cx">         FloatSize size = cursor.image()->size();
</span><span class="cx">         result.appendLiteral(" image=");
</span><del>-        result.appendNumber(size.width());
</del><ins>+        result.appendFixedPrecisionNumber(size.width());
</ins><span class="cx">         result.append('x');
</span><del>-        result.appendNumber(size.height());
</del><ins>+        result.appendFixedPrecisionNumber(size.height());
</ins><span class="cx">     }
</span><span class="cx"> #if ENABLE(MOUSE_CURSOR_SCALE)
</span><span class="cx">     if (cursor.imageScaleFactor() != 1) {
</span><span class="cx">         result.appendLiteral(" scale=");
</span><del>-        result.appendNumber(cursor.imageScaleFactor(), 8);
</del><ins>+        result.appendFixedPrecisionNumber(cursor.imageScaleFactor(), 8);
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx">     return result.toString();
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXPathValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XPathValue.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XPathValue.cpp  2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebCore/xml/XPathValue.cpp     2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx">                 return "0"_s;
</span><span class="cx">             if (std::isinf(m_number))
</span><span class="cx">                 return std::signbit(m_number) ? "-Infinity"_s : "Infinity"_s;
</span><del>-            return String::number(m_number);
</del><ins>+            return String::numberToStringFixedPrecision(m_number);
</ins><span class="cx">         case BooleanValue:
</span><span class="cx">             return m_bool ? "true"_s : "false"_s;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebKit/ChangeLog       2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2019-03-11  Darin Adler  <darin@apple.com>
+
+        Specify fixed precision explicitly to prepare to change String::number and StringBuilder::appendNumber floating point behavior
+        https://bugs.webkit.org/show_bug.cgi?id=195533
+
+        Reviewed by Brent Fulgham.
+
+        * NetworkProcess/cache/NetworkCache.cpp:
+        (WebKit::NetworkCache::Cache::dumpContentsToFile): Use appendFixedPrecisionNumber.
+        * NetworkProcess/cache/NetworkCacheEntry.cpp:
+        (WebKit::NetworkCache::Entry::asJSON const): Ditto.
+        * Shared/Gamepad/GamepadData.cpp:
+        (WebKit::GamepadData::loggingString const): Ditto.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::logDiagnosticMessageWithValue): Use numberToStringFixedPrecision.
+
</ins><span class="cx"> 2019-03-11  John Wilander  <wilander@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Resource Load Statistics: Make it possible exclude localhost from classification
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcesscacheNetworkCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp        2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp   2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -549,7 +549,7 @@
</span><span class="cx">             epilogue.appendNumber(totals.bodySize);
</span><span class="cx">             epilogue.appendLiteral(",\n");
</span><span class="cx">             epilogue.appendLiteral("\"averageWorth\": ");
</span><del>-            epilogue.appendNumber(totals.count ? totals.worth / totals.count : 0);
</del><ins>+            epilogue.appendFixedPrecisionNumber(totals.count ? totals.worth / totals.count : 0);
</ins><span class="cx">             epilogue.appendLiteral("\n");
</span><span class="cx">             epilogue.appendLiteral("}\n}\n");
</span><span class="cx">             auto writeData = epilogue.toString().utf8();
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcesscacheNetworkCacheEntrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheEntry.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheEntry.cpp   2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheEntry.cpp      2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -219,13 +219,13 @@
</span><span class="cx">     json.appendNumber(info.bodySize);
</span><span class="cx">     json.appendLiteral(",\n");
</span><span class="cx">     json.appendLiteral("\"worth\": ");
</span><del>-    json.appendNumber(info.worth);
</del><ins>+    json.appendFixedPrecisionNumber(info.worth);
</ins><span class="cx">     json.appendLiteral(",\n");
</span><span class="cx">     json.appendLiteral("\"partition\": ");
</span><span class="cx">     json.appendQuotedJSONString(m_key.partition());
</span><span class="cx">     json.appendLiteral(",\n");
</span><span class="cx">     json.appendLiteral("\"timestamp\": ");
</span><del>-    json.appendNumber(m_timeStamp.secondsSinceEpoch().milliseconds());
</del><ins>+    json.appendFixedPrecisionNumber(m_timeStamp.secondsSinceEpoch().milliseconds());
</ins><span class="cx">     json.appendLiteral(",\n");
</span><span class="cx">     json.appendLiteral("\"URL\": ");
</span><span class="cx">     json.appendQuotedJSONString(m_response.url().string());
</span></span></pre></div>
<a id="trunkSourceWebKitSharedGamepadGamepadDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/Gamepad/GamepadData.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/Gamepad/GamepadData.cpp       2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebKit/Shared/Gamepad/GamepadData.cpp  2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">         builder.appendLiteral(" Axis ");
</span><span class="cx">         builder.appendNumber(i);
</span><span class="cx">         builder.appendLiteral(": ");
</span><del>-        builder.appendNumber(m_axisValues[i]);
</del><ins>+        builder.appendFixedPrecisionNumber(m_axisValues[i]);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     builder.append('\n');
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx">         builder.appendLiteral(" Button ");
</span><span class="cx">         builder.appendNumber(i);
</span><span class="cx">         builder.appendLiteral(": ");
</span><del>-        builder.appendNumber(m_buttonValues[i]);
</del><ins>+        builder.appendFixedPrecisionNumber(m_buttonValues[i]);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return builder.toString();
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (242712 => 242713)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp   2019-03-11 17:01:27 UTC (rev 242712)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp      2019-03-11 17:11:13 UTC (rev 242713)
</span><span class="lines">@@ -6442,7 +6442,7 @@
</span><span class="cx">     if (!effectiveClient)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    effectiveClient->logDiagnosticMessageWithValue(this, message, description, String::number(value, significantFigures));
</del><ins>+    effectiveClient->logDiagnosticMessageWithValue(this, message, description, String::numberToStringFixedPrecision(value, significantFigures));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::logDiagnosticMessageWithEnhancedPrivacy(const String& message, const String& description, ShouldSample shouldSample)
</span></span></pre>
</div>
</div>

</body>
</html>