<!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>[242316] 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/242316">242316</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2019-03-02 12:54:59 -0800 (Sat, 02 Mar 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixed makeString(float) to do shortest-form serialization without first converting to double
https://bugs.webkit.org/show_bug.cgi?id=195142

Reviewed by Daniel Bates.

Source/WebCore:

* platform/graphics/Color.cpp: Removed unneeded include of DecimalNumber.h.

Source/WebKit:

* UIProcess/PerActivityStateCPUUsageSampler.cpp: Removed unneeded include of DecimalNumber.h.

Source/WTF:

* wtf/DecimalNumber.cpp: Removed unneeded includes.

* wtf/DecimalNumber.h: Removed unused constructors; over time we will be
deprecating DecimalNumber, so we should removed the unused parts. Also
marked the constructor explicit, removed types used only for arguments for
the constructors, and removed the sign, exponent, significand, and precision
member functions.

* wtf/JSONValues.cpp:
(WTF::JSONImpl::Value::writeJSON const): Updated for changes to DecimalNumber
switched from NumberToLStringBuffer to NumberToStringBuffer, and for use of
std::array instead of C arrays.

* wtf/dtoa.cpp: Removed unused dtoaRoundSF and dtoaRoundDP functions.
(WTF::dtoa): Updated to use std::array instead of C arrays.
(WTF::dtoaRoundSF): Removed.
(WTF::dtoaRoundDP): Removed.
(WTF::numberToString): Added an overload for float and updated to use std::array.
(WTF::formatStringTruncatingTrailingZerosIfNeeded): Updated to use std::array.
(WTF::numberToFixedPrecisionString): Ditto.
(WTF::numberToFixedWidthString): Ditto.

* wtf/dtoa.h: Changed arrays to be std::array instead of C arrays so the
array types will be checked. Removed dtoaRoundSF and dtoaRoundDP.
Added float overloads for numberToString, numberToFixedPrecisionString,
and numberToFixedWidthString. The only one of these that is called at this
time is numberToString, called by the floating point StringTypeAdapter in
StringConcatenateNummbers.h.

* wtf/text/StringConcatenateNumbers.h: Updated for std::array.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfDecimalNumbercpp">trunk/Source/WTF/wtf/DecimalNumber.cpp</a></li>
<li><a href="#trunkSourceWTFwtfDecimalNumberh">trunk/Source/WTF/wtf/DecimalNumber.h</a></li>
<li><a href="#trunkSourceWTFwtfJSONValuescpp">trunk/Source/WTF/wtf/JSONValues.cpp</a></li>
<li><a href="#trunkSourceWTFwtfdtoacpp">trunk/Source/WTF/wtf/dtoa.cpp</a></li>
<li><a href="#trunkSourceWTFwtfdtoah">trunk/Source/WTF/wtf/dtoa.h</a></li>
<li><a href="#trunkSourceWTFwtftextStringConcatenateNumbersh">trunk/Source/WTF/wtf/text/StringConcatenateNumbers.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsColorcpp">trunk/Source/WebCore/platform/graphics/Color.cpp</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitUIProcessPerActivityStateCPUUsageSamplercpp">trunk/Source/WebKit/UIProcess/PerActivityStateCPUUsageSampler.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WTF/ChangeLog  2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2019-02-27  Darin Adler  <darin@apple.com>
+
+        Fixed makeString(float) to do shortest-form serialization without first converting to double
+        https://bugs.webkit.org/show_bug.cgi?id=195142
+
+        Reviewed by Daniel Bates.
+
+        * wtf/DecimalNumber.cpp: Removed unneeded includes.
+
+        * wtf/DecimalNumber.h: Removed unused constructors; over time we will be
+        deprecating DecimalNumber, so we should removed the unused parts. Also
+        marked the constructor explicit, removed types used only for arguments for
+        the constructors, and removed the sign, exponent, significand, and precision
+        member functions.
+
+        * wtf/JSONValues.cpp:
+        (WTF::JSONImpl::Value::writeJSON const): Updated for changes to DecimalNumber
+        switched from NumberToLStringBuffer to NumberToStringBuffer, and for use of
+        std::array instead of C arrays.
+
+        * wtf/dtoa.cpp: Removed unused dtoaRoundSF and dtoaRoundDP functions.
+        (WTF::dtoa): Updated to use std::array instead of C arrays.
+        (WTF::dtoaRoundSF): Removed.
+        (WTF::dtoaRoundDP): Removed.
+        (WTF::numberToString): Added an overload for float and updated to use std::array.
+        (WTF::formatStringTruncatingTrailingZerosIfNeeded): Updated to use std::array.
+        (WTF::numberToFixedPrecisionString): Ditto.
+        (WTF::numberToFixedWidthString): Ditto.
+
+        * wtf/dtoa.h: Changed arrays to be std::array instead of C arrays so the
+        array types will be checked. Removed dtoaRoundSF and dtoaRoundDP.
+        Added float overloads for numberToString, numberToFixedPrecisionString,
+        and numberToFixedWidthString. The only one of these that is called at this
+        time is numberToString, called by the floating point StringTypeAdapter in
+        StringConcatenateNummbers.h.
+
+        * wtf/text/StringConcatenateNumbers.h: Updated for std::array.
+
</ins><span class="cx"> 2019-03-01  Darin Adler  <darin@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Finish removing String::format
</span></span></pre></div>
<a id="trunkSourceWTFwtfDecimalNumbercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/DecimalNumber.cpp (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/DecimalNumber.cpp   2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WTF/wtf/DecimalNumber.cpp      2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -26,9 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include <wtf/DecimalNumber.h>
</span><span class="cx"> 
</span><del>-#include <math.h>
</del><span class="cx"> #include <wtf/MathExtras.h>
</span><del>-#include <wtf/text/WTFString.h>
</del><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWTFwtfDecimalNumberh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/DecimalNumber.h (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/DecimalNumber.h     2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WTF/wtf/DecimalNumber.h        2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -25,19 +25,14 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include <math.h>
</del><ins>+#include <cmath>
</ins><span class="cx"> #include <wtf/dtoa.h>
</span><del>-#include <wtf/MathExtras.h>
-#include <wtf/text/WTFString.h>
</del><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><del>-enum RoundingSignificantFiguresType { RoundingSignificantFigures };
-enum RoundingDecimalPlacesType { RoundingDecimalPlaces };
-
</del><span class="cx"> class DecimalNumber {
</span><span class="cx"> public:
</span><del>-    DecimalNumber(double d)
</del><ins>+    explicit DecimalNumber(double d)
</ins><span class="cx">     {
</span><span class="cx">         ASSERT(std::isfinite(d));
</span><span class="cx">         dtoa(m_significand, d, m_sign, m_exponent, m_precision);
</span><span class="lines">@@ -51,35 +46,6 @@
</span><span class="cx">         ASSERT(m_significand[0] == '0' || m_significand[m_precision - 1] != '0');
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    DecimalNumber(double d, RoundingSignificantFiguresType, unsigned significantFigures)
-    {
-        ASSERT(std::isfinite(d));
-        dtoaRoundSF(m_significand, d, significantFigures, m_sign, m_exponent, m_precision);
-
-        ASSERT_WITH_SECURITY_IMPLICATION(significantFigures && significantFigures <= sizeof(DtoaBuffer));
-        while (m_precision < significantFigures)
-            m_significand[m_precision++] = '0';
-
-        ASSERT(m_precision);
-        // Zero should always have exponent 0.
-        ASSERT(m_significand[0] != '0' || !m_exponent);
-    }
-
-    DecimalNumber(double d, RoundingDecimalPlacesType, unsigned decimalPlaces)
-    {
-        ASSERT(std::isfinite(d));
-        dtoaRoundDP(m_significand, d, decimalPlaces, m_sign, m_exponent, m_precision);
-
-        unsigned significantFigures = 1 + m_exponent + decimalPlaces;
-        ASSERT_WITH_SECURITY_IMPLICATION(significantFigures && significantFigures <= sizeof(DtoaBuffer));
-        while (m_precision < significantFigures)
-            m_significand[m_precision++] = '0';
-
-        ASSERT(m_precision);
-        // Zero should always have exponent 0.
-        ASSERT(m_significand[0] != '0' || !m_exponent);
-    }
-
</del><span class="cx">     WTF_EXPORT_PRIVATE unsigned bufferLengthForStringDecimal() const;
</span><span class="cx">     WTF_EXPORT_PRIVATE unsigned bufferLengthForStringExponential() const;
</span><span class="cx"> 
</span><span class="lines">@@ -86,11 +52,6 @@
</span><span class="cx">     WTF_EXPORT_PRIVATE unsigned toStringDecimal(LChar* buffer, unsigned bufferLength) const;
</span><span class="cx">     WTF_EXPORT_PRIVATE unsigned toStringExponential(LChar* buffer, unsigned bufferLength) const;
</span><span class="cx"> 
</span><del>-    bool sign() const { return m_sign; }
-    int exponent() const { return m_exponent; }
-    const char* significand() const { return m_significand; } // significand contains precision characters, is not null-terminated.
-    unsigned precision() const { return m_precision; }
-
</del><span class="cx"> private:
</span><span class="cx">     bool m_sign;
</span><span class="cx">     int m_exponent;
</span><span class="lines">@@ -101,5 +62,3 @@
</span><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span><span class="cx"> using WTF::DecimalNumber;
</span><del>-using WTF::RoundingSignificantFigures;
-using WTF::RoundingDecimalPlaces;
</del></span></pre></div>
<a id="trunkSourceWTFwtfJSONValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/JSONValues.cpp (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/JSONValues.cpp      2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WTF/wtf/JSONValues.cpp 2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -673,24 +673,24 @@
</span><span class="cx">         break;
</span><span class="cx">     case Type::Double:
</span><span class="cx">     case Type::Integer: {
</span><del>-        NumberToLStringBuffer buffer;
</del><span class="cx">         if (!std::isfinite(m_value.number)) {
</span><span class="cx">             output.appendLiteral("null");
</span><span class="cx">             return;
</span><span class="cx">         }
</span><del>-        DecimalNumber decimal = m_value.number;
</del><ins>+        DecimalNumber decimal { m_value.number };
+        NumberToStringBuffer buffer;
</ins><span class="cx">         unsigned length = 0;
</span><del>-        if (decimal.bufferLengthForStringDecimal() > WTF::NumberToStringBufferLength) {
</del><ins>+        if (decimal.bufferLengthForStringDecimal() > sizeof(buffer)) {
</ins><span class="cx">             // Not enough room for decimal. Use exponential format.
</span><del>-            if (decimal.bufferLengthForStringExponential() > WTF::NumberToStringBufferLength) {
</del><ins>+            if (decimal.bufferLengthForStringExponential() > sizeof(buffer)) {
</ins><span class="cx">                 // Fallback for an abnormal case if it's too little even for exponential.
</span><span class="cx">                 output.appendLiteral("NaN");
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><del>-            length = decimal.toStringExponential(buffer, WTF::NumberToStringBufferLength);
</del><ins>+            length = decimal.toStringExponential(reinterpret_cast<LChar*>(&buffer[0]), sizeof(buffer));
</ins><span class="cx">         } else
</span><del>-            length = decimal.toStringDecimal(buffer, WTF::NumberToStringBufferLength);
-        output.append(buffer, length);
</del><ins>+            length = decimal.toStringDecimal(reinterpret_cast<LChar*>(&buffer[0]), sizeof(buffer));
+        output.append(&buffer[0], length);
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx">     default:
</span></span></pre></div>
<a id="trunkSourceWTFwtfdtoacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/dtoa.cpp (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/dtoa.cpp    2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WTF/wtf/dtoa.cpp       2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx">  * The author of this software is David M. Gay.
</span><span class="cx">  *
</span><span class="cx">  * Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
</span><del>- * Copyright (C) 2002-2017 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2002-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Permission to use, copy, modify, and distribute this software for any
</span><span class="cx">  * purpose without fee is hereby granted, provided that this entire notice
</span><span class="lines">@@ -728,17 +728,9 @@
</span><span class="cx">  *       "uniformly" distributed input, the probability is
</span><span class="cx">  *       something like 10^(k-15) that we must resort to the int32_t
</span><span class="cx">  *       calculation.
</span><del>- *
- * Note: 'leftright' translates to 'generate shortest possible string'.
</del><span class="cx">  */
</span><del>-template<bool roundingNone, bool roundingSignificantFigures, bool roundingDecimalPlaces, bool leftright>
-void dtoa(DtoaBuffer result, double dd, int ndigits, bool& signOut, int& exponentOut, unsigned& precisionOut)
</del><ins>+void dtoa(DtoaBuffer& result, double dd, bool& signOut, int& exponentOut, unsigned& precisionOut)
</ins><span class="cx"> {
</span><del>-    // Exactly one rounding mode must be specified.
-    ASSERT(roundingNone + roundingSignificantFigures + roundingDecimalPlaces == 1);
-    // roundingNone only allowed (only sensible?) with leftright set.
-    ASSERT(!roundingNone || leftright);
-
</del><span class="cx">     ASSERT(std::isfinite(dd));
</span><span class="cx"> 
</span><span class="cx">     int bbits, b2, b5, be, dig, i, ieps, ilim = 0, ilim0, ilim1 = 0,
</span><span class="lines">@@ -843,25 +835,10 @@
</span><span class="cx">         s5 = 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (roundingNone) {
-        ilim = ilim1 = -1;
-        i = 18;
-        ndigits = 0;
-    }
-    if (roundingSignificantFigures) {
-        if (ndigits <= 0)
-            ndigits = 1;
-        ilim = ilim1 = i = ndigits;
-    }
-    if (roundingDecimalPlaces) {
-        i = ndigits + k + 1;
-        ilim = i;
-        ilim1 = i - 1;
-        if (i <= 0)
-            i = 1;
-    }
</del><ins>+    ilim = ilim1 = -1;
+    i = 18;
</ins><span class="cx"> 
</span><del>-    s = s0 = result;
</del><ins>+    s = s0 = &result[0];
</ins><span class="cx"> 
</span><span class="cx">     if (ilim >= 0 && ilim <= Quick_max) {
</span><span class="cx">         /* Try to get by with floating-point arithmetic. */
</span><span class="lines">@@ -916,43 +893,22 @@
</span><span class="cx">                 goto noDigits;
</span><span class="cx">             goto fastFailed;
</span><span class="cx">         }
</span><del>-        if (leftright) {
-            /* Use Steele & White method of only
-             * generating digits needed.
-             */
-            dval(&eps) = (0.5 / tens[ilim - 1]) - dval(&eps);
-            for (i = 0;;) {
-                L = (long int)dval(&u);
-                dval(&u) -= L;
-                *s++ = '0' + (int)L;
-                if (dval(&u) < dval(&eps))
-                    goto ret;
-                if (1. - dval(&u) < dval(&eps))
-                    goto bumpUp;
-                if (++i >= ilim)
-                    break;
-                dval(&eps) *= 10.;
-                dval(&u) *= 10.;
-            }
-        } else {
-            /* Generate ilim digits, then fix them up. */
-            dval(&eps) *= tens[ilim - 1];
-            for (i = 1;; i++, dval(&u) *= 10.) {
-                L = (int32_t)(dval(&u));
-                if (!(dval(&u) -= L))
-                    ilim = i;
-                *s++ = '0' + (int)L;
-                if (i == ilim) {
-                    if (dval(&u) > 0.5 + dval(&eps))
-                        goto bumpUp;
-                    if (dval(&u) < 0.5 - dval(&eps)) {
-                        while (*--s == '0') { }
-                        s++;
-                        goto ret;
-                    }
-                    break;
-                }
-            }
</del><ins>+        /* Use Steele & White method of only
+         * generating digits needed.
+         */
+        dval(&eps) = (0.5 / tens[ilim - 1]) - dval(&eps);
+        for (i = 0;;) {
+            L = (long int)dval(&u);
+            dval(&u) -= L;
+            *s++ = '0' + (int)L;
+            if (dval(&u) < dval(&eps))
+                goto ret;
+            if (1. - dval(&u) < dval(&eps))
+                goto bumpUp;
+            if (++i >= ilim)
+                break;
+            dval(&eps) *= 10.;
+            dval(&u) *= 10.;
</ins><span class="cx">         }
</span><span class="cx"> fastFailed:
</span><span class="cx">         s = s0;
</span><span class="lines">@@ -966,13 +922,6 @@
</span><span class="cx">     if (be >= 0 && k <= Int_max) {
</span><span class="cx">         /* Yes. */
</span><span class="cx">         ds = tens[k];
</span><del>-        if (ndigits < 0 && ilim <= 0) {
-            S.clear();
-            mhi.clear();
-            if (ilim < 0 || dval(&u) <= 5 * ds)
-                goto noDigits;
-            goto oneDigit;
-        }
</del><span class="cx">         for (i = 1;; i++, dval(&u) *= 10.) {
</span><span class="cx">             L = (int32_t)(dval(&u) / ds);
</span><span class="cx">             dval(&u) -= L * ds;
</span><span class="lines">@@ -1002,12 +951,10 @@
</span><span class="cx">     m5 = b5;
</span><span class="cx">     mhi.clear();
</span><span class="cx">     mlo.clear();
</span><del>-    if (leftright) {
-        i = denorm ? be + (Bias + (P - 1) - 1 + 1) : 1 + P - bbits;
-        b2 += i;
-        s2 += i;
-        i2b(mhi, 1);
-    }
</del><ins>+    i = denorm ? be + (Bias + (P - 1) - 1 + 1) : 1 + P - bbits;
+    b2 += i;
+    s2 += i;
+    i2b(mhi, 1);
</ins><span class="cx">     if (m2 > 0 && s2 > 0) {
</span><span class="cx">         i = m2 < s2 ? m2 : s2;
</span><span class="cx">         b2 -= i;
</span><span class="lines">@@ -1015,15 +962,12 @@
</span><span class="cx">         s2 -= i;
</span><span class="cx">     }
</span><span class="cx">     if (b5 > 0) {
</span><del>-        if (leftright) {
-            if (m5 > 0) {
-                pow5mult(mhi, m5);
-                mult(b, mhi);
-            }
-            if ((j = b5 - m5))
-                pow5mult(b, j);
-        } else
-            pow5mult(b, b5);
</del><ins>+        if (m5 > 0) {
+            pow5mult(mhi, m5);
+            mult(b, mhi);
+        }
+        if ((j = b5 - m5))
+            pow5mult(b, j);
</ins><span class="cx">     }
</span><span class="cx">     i2b(S, 1);
</span><span class="cx">     if (s5 > 0)
</span><span class="lines">@@ -1032,7 +976,7 @@
</span><span class="cx">     /* Check for special case that d is a normalized power of 2. */
</span><span class="cx"> 
</span><span class="cx">     spec_case = 0;
</span><del>-    if ((roundingNone || leftright) && (!word1(&u) && !(word0(&u) & Bndry_mask) && word0(&u) & (Exp_mask & ~Exp_msk1))) {
</del><ins>+    if ((!word1(&u) && !(word0(&u) & Bndry_mask) && word0(&u) & (Exp_mask & ~Exp_msk1))) {
</ins><span class="cx">         /* The special case */
</span><span class="cx">         b2 += Log2P;
</span><span class="cx">         s2 += Log2P;
</span><span class="lines">@@ -1067,105 +1011,84 @@
</span><span class="cx">         if (cmp(b, S) < 0) {
</span><span class="cx">             k--;
</span><span class="cx">             multadd(b, 10, 0);    /* we botched the k estimate */
</span><del>-            if (leftright)
-                multadd(mhi, 10, 0);
</del><ins>+            multadd(mhi, 10, 0);
</ins><span class="cx">             ilim = ilim1;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    if (ilim <= 0 && roundingDecimalPlaces) {
-        if (ilim < 0)
-            goto noDigits;
-        multadd(S, 5, 0);
-        // For IEEE-754 unbiased rounding this check should be <=, such that 0.5 would flush to zero.
-        if (cmp(b, S) < 0)
-            goto noDigits;
-        goto oneDigit;
-    }
-    if (leftright) {
-        if (m2 > 0)
-            lshift(mhi, m2);
</del><ins>+    if (m2 > 0)
+        lshift(mhi, m2);
</ins><span class="cx"> 
</span><del>-        /* Compute mlo -- check for special case
-         * that d is a normalized power of 2.
-         */
</del><ins>+    /* Compute mlo -- check for special case
+     * that d is a normalized power of 2.
+     */
</ins><span class="cx"> 
</span><del>-        mlo = mhi;
-        if (spec_case)
-            lshift(mhi, Log2P);
</del><ins>+    mlo = mhi;
+    if (spec_case)
+        lshift(mhi, Log2P);
</ins><span class="cx"> 
</span><del>-        for (i = 1;;i++) {
-            dig = quorem(b, S) + '0';
-            /* Do we yet have the shortest decimal string
-             * that will round to d?
-             */
-            j = cmp(b, mlo);
-            diff(delta, S, mhi);
-            j1 = delta.sign ? 1 : cmp(b, delta);
</del><ins>+    for (i = 1;;i++) {
+        dig = quorem(b, S) + '0';
+        /* Do we yet have the shortest decimal string
+         * that will round to d?
+         */
+        j = cmp(b, mlo);
+        diff(delta, S, mhi);
+        j1 = delta.sign ? 1 : cmp(b, delta);
</ins><span class="cx"> #ifdef DTOA_ROUND_BIASED
</span><del>-            if (j < 0 || !j) {
</del><ins>+        if (j < 0 || !j) {
</ins><span class="cx"> #else
</span><del>-            // FIXME: ECMA-262 specifies that equidistant results round away from
-            // zero, which probably means we shouldn't be on the unbiased code path
-            // (the (word1(&u) & 1) clause is looking highly suspicious). I haven't
-            // yet understood this code well enough to make the call, but we should
-            // probably be enabling DTOA_ROUND_BIASED. I think the interesting corner
-            // case to understand is probably "Math.pow(0.5, 24).toString()".
-            // I believe this value is interesting because I think it is precisely
-            // representable in binary floating point, and its decimal representation
-            // has a single digit that Steele & White reduction can remove, with the
-            // value 5 (thus equidistant from the next numbers above and below).
-            // We produce the correct answer using either codepath, and I don't as
-            // yet understand why. :-)
-            if (!j1 && !(word1(&u) & 1)) {
-                if (dig == '9')
-                    goto round9up;
-                if (j > 0)
</del><ins>+        // FIXME: ECMA-262 specifies that equidistant results round away from
+        // zero, which probably means we shouldn't be on the unbiased code path
+        // (the (word1(&u) & 1) clause is looking highly suspicious). I haven't
+        // yet understood this code well enough to make the call, but we should
+        // probably be enabling DTOA_ROUND_BIASED. I think the interesting corner
+        // case to understand is probably "Math.pow(0.5, 24).toString()".
+        // I believe this value is interesting because I think it is precisely
+        // representable in binary floating point, and its decimal representation
+        // has a single digit that Steele & White reduction can remove, with the
+        // value 5 (thus equidistant from the next numbers above and below).
+        // We produce the correct answer using either codepath, and I don't as
+        // yet understand why. :-)
+        if (!j1 && !(word1(&u) & 1)) {
+            if (dig == '9')
+                goto round9up;
+            if (j > 0)
+                dig++;
+            *s++ = dig;
+            goto ret;
+        }
+        if (j < 0 || (!j && !(word1(&u) & 1))) {
+#endif
+            if ((b.words()[0] || b.size() > 1) && (j1 > 0)) {
+                lshift(b, 1);
+                j1 = cmp(b, S);
+                // For IEEE-754 round-to-even, this check should be (j1 > 0 || (!j1 && (dig & 1))),
+                // but ECMA-262 specifies that equidistant values (e.g. (.5).toFixed()) should
+                // be rounded away from zero.
+                if (j1 >= 0) {
+                    if (dig == '9')
+                        goto round9up;
</ins><span class="cx">                     dig++;
</span><del>-                *s++ = dig;
-                goto ret;
-            }
-            if (j < 0 || (!j && !(word1(&u) & 1))) {
-#endif
-                if ((b.words()[0] || b.size() > 1) && (j1 > 0)) {
-                    lshift(b, 1);
-                    j1 = cmp(b, S);
-                    // For IEEE-754 round-to-even, this check should be (j1 > 0 || (!j1 && (dig & 1))),
-                    // but ECMA-262 specifies that equidistant values (e.g. (.5).toFixed()) should
-                    // be rounded away from zero.
-                    if (j1 >= 0) {
-                        if (dig == '9')
-                            goto round9up;
-                        dig++;
-                    }
</del><span class="cx">                 }
</span><del>-                *s++ = dig;
-                goto ret;
</del><span class="cx">             }
</span><del>-            if (j1 > 0) {
-                if (dig == '9') { /* possible if i == 1 */
</del><ins>+            *s++ = dig;
+            goto ret;
+        }
+        if (j1 > 0) {
+            if (dig == '9') { /* possible if i == 1 */
</ins><span class="cx"> round9up:
</span><del>-                    *s++ = '9';
-                    goto roundoff;
-                }
-                *s++ = dig + 1;
-                goto ret;
</del><ins>+                *s++ = '9';
+                goto roundoff;
</ins><span class="cx">             }
</span><del>-            *s++ = dig;
-            if (i == ilim)
-                break;
-            multadd(b, 10, 0);
-            multadd(mlo, 10, 0);
-            multadd(mhi, 10, 0);
</del><ins>+            *s++ = dig + 1;
+            goto ret;
</ins><span class="cx">         }
</span><del>-    } else {
-        for (i = 1;; i++) {
-            *s++ = dig = quorem(b, S) + '0';
-            if (!b.words()[0] && b.size() <= 1)
-                goto ret;
-            if (i >= ilim)
-                break;
-            multadd(b, 10, 0);
-        }
</del><ins>+        *s++ = dig;
+        if (i == ilim)
+            break;
+        multadd(b, 10, 0);
+        multadd(mlo, 10, 0);
+        multadd(mhi, 10, 0);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     /* Round off last digit */
</span><span class="lines">@@ -1200,39 +1123,28 @@
</span><span class="cx">     k++;
</span><span class="cx">     goto ret;
</span><span class="cx"> ret:
</span><del>-    ASSERT(s > result);
</del><ins>+    ASSERT(s > &result[0]);
</ins><span class="cx">     *s = 0;
</span><span class="cx">     exponentOut = k;
</span><del>-    precisionOut = s - result;
</del><ins>+    precisionOut = s - &result[0];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void dtoa(DtoaBuffer result, double dd, bool& sign, int& exponent, unsigned& precision)
</del><ins>+const char* numberToString(float number, NumberToStringBuffer& buffer)
</ins><span class="cx"> {
</span><del>-    // flags are roundingNone, leftright.
-    dtoa<true, false, false, true>(result, dd, 0, sign, exponent, precision);
</del><ins>+    double_conversion::StringBuilder builder(&buffer[0], sizeof(buffer));
+    double_conversion::DoubleToStringConverter::EcmaScriptConverter().ToShortestSingle(number, &builder);
+    return builder.Finalize();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void dtoaRoundSF(DtoaBuffer result, double dd, int ndigits, bool& sign, int& exponent, unsigned& precision)
</del><ins>+const char* numberToString(double d, NumberToStringBuffer& buffer)
</ins><span class="cx"> {
</span><del>-    // flag is roundingSignificantFigures.
-    dtoa<false, true, false, false>(result, dd, ndigits, sign, exponent, precision);
-}
-
-void dtoaRoundDP(DtoaBuffer result, double dd, int ndigits, bool& sign, int& exponent, unsigned& precision)
-{
-    // flag is roundingDecimalPlaces.
-    dtoa<false, false, true, false>(result, dd, ndigits, sign, exponent, precision);
-}
-
-const char* numberToString(double d, NumberToStringBuffer buffer)
-{
-    double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength);
</del><ins>+    double_conversion::StringBuilder builder(&buffer[0], sizeof(buffer));
</ins><span class="cx">     auto& converter = double_conversion::DoubleToStringConverter::EcmaScriptConverter();
</span><span class="cx">     converter.ToShortest(d, &builder);
</span><span class="cx">     return builder.Finalize();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline const char* formatStringTruncatingTrailingZerosIfNeeded(NumberToStringBuffer buffer, double_conversion::StringBuilder& builder)
</del><ins>+static inline const char* formatStringTruncatingTrailingZerosIfNeeded(NumberToStringBuffer& buffer, double_conversion::StringBuilder& builder)
</ins><span class="cx"> {
</span><span class="cx">     size_t length = builder.position();
</span><span class="cx">     size_t decimalPointPosition = 0;
</span><span class="lines">@@ -1270,7 +1182,7 @@
</span><span class="cx">     return builder.Finalize();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char* numberToFixedPrecisionString(double d, unsigned significantFigures, NumberToStringBuffer buffer, bool truncateTrailingZeros)
</del><ins>+const char* numberToFixedPrecisionString(double d, unsigned significantFigures, NumberToStringBuffer& buffer, bool truncateTrailingZeros)
</ins><span class="cx"> {
</span><span class="cx">     // Mimic sprintf("%.[precision]g", ...), but use dtoas rounding facilities.
</span><span class="cx">     // "g": Signed value printed in f or e format, whichever is more compact for the given value and precision.
</span><span class="lines">@@ -1277,7 +1189,7 @@
</span><span class="cx">     // The e format is used only when the exponent of the value is less than –4 or greater than or equal to the
</span><span class="cx">     // precision argument. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it.
</span><span class="cx">     // "precision": The precision specifies the maximum number of significant digits printed.
</span><del>-    double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength);
</del><ins>+    double_conversion::StringBuilder builder(&buffer[0], sizeof(buffer));
</ins><span class="cx">     auto& converter = double_conversion::DoubleToStringConverter::EcmaScriptConverter();
</span><span class="cx">     converter.ToPrecision(d, significantFigures, &builder);
</span><span class="cx">     if (!truncateTrailingZeros)
</span><span class="lines">@@ -1285,7 +1197,7 @@
</span><span class="cx">     return formatStringTruncatingTrailingZerosIfNeeded(buffer, builder);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char* numberToFixedWidthString(double d, unsigned decimalPlaces, NumberToStringBuffer buffer)
</del><ins>+const char* numberToFixedWidthString(double d, unsigned decimalPlaces, NumberToStringBuffer& buffer)
</ins><span class="cx"> {
</span><span class="cx">     // Mimic sprintf("%.[precision]f", ...), but use dtoas rounding facilities.
</span><span class="cx">     // "f": Signed value having the form [ – ]dddd.dddd, where dddd is one or more decimal digits.
</span><span class="lines">@@ -1294,7 +1206,7 @@
</span><span class="cx">     // "precision": The precision value specifies the number of digits after the decimal point.
</span><span class="cx">     // If a decimal point appears, at least one digit appears before it.
</span><span class="cx">     // The value is rounded to the appropriate number of digits.    
</span><del>-    double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength);
</del><ins>+    double_conversion::StringBuilder builder(&buffer[0], sizeof(buffer));
</ins><span class="cx">     auto& converter = double_conversion::DoubleToStringConverter::EcmaScriptConverter();
</span><span class="cx">     converter.ToFixed(d, decimalPlaces, &builder);
</span><span class="cx">     return builder.Finalize();
</span></span></pre></div>
<a id="trunkSourceWTFwtfdtoah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/dtoa.h (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/dtoa.h      2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WTF/wtf/dtoa.h 2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- *  Copyright (C) 2003, 2008, 2012 Apple Inc. All rights reserved.
</del><ins>+ *  Copyright (C) 2003-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  *  This library is free software; you can redistribute it and/or
</span><span class="cx">  *  modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include <unicode/utypes.h>
</del><ins>+#include <array>
</ins><span class="cx"> #include <wtf/ASCIICType.h>
</span><span class="cx"> #include <wtf/dtoa/double-conversion.h>
</span><span class="cx"> #include <wtf/text/StringView.h>
</span><span class="lines">@@ -27,21 +27,21 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><del>-typedef char DtoaBuffer[80];
</del><ins>+using DtoaBuffer = std::array<char, 80>;
</ins><span class="cx"> 
</span><del>-WTF_EXPORT_PRIVATE void dtoa(DtoaBuffer result, double dd, bool& sign, int& exponent, unsigned& precision);
-WTF_EXPORT_PRIVATE void dtoaRoundSF(DtoaBuffer result, double dd, int ndigits, bool& sign, int& exponent, unsigned& precision);
-WTF_EXPORT_PRIVATE void dtoaRoundDP(DtoaBuffer result, double dd, int ndigits, bool& sign, int& exponent, unsigned& precision);
</del><ins>+WTF_EXPORT_PRIVATE void dtoa(DtoaBuffer& result, double dd, bool& sign, int& exponent, unsigned& precision);
</ins><span class="cx"> 
</span><del>-// Size = 80 for sizeof(DtoaBuffer) + some sign bits, decimal point, 'e', exponent digits.
-const unsigned NumberToStringBufferLength = 96;
-typedef char NumberToStringBuffer[NumberToStringBufferLength];
-typedef LChar NumberToLStringBuffer[NumberToStringBufferLength];
</del><ins>+constexpr unsigned NumberToStringBufferLength = 96;
+using NumberToStringBuffer = std::array<char, NumberToStringBufferLength>;
</ins><span class="cx"> 
</span><del>-WTF_EXPORT_PRIVATE const char* numberToString(double, NumberToStringBuffer);
-WTF_EXPORT_PRIVATE const char* numberToFixedPrecisionString(double, unsigned significantFigures, NumberToStringBuffer, bool truncateTrailingZeros = false);
-WTF_EXPORT_PRIVATE const char* numberToFixedWidthString(double, unsigned decimalPlaces, NumberToStringBuffer);
</del><ins>+WTF_EXPORT_PRIVATE const char* numberToString(float, NumberToStringBuffer&);
+WTF_EXPORT_PRIVATE const char* numberToFixedPrecisionString(float, unsigned significantFigures, NumberToStringBuffer&, bool truncateTrailingZeros = false);
+WTF_EXPORT_PRIVATE const char* numberToFixedWidthString(float, unsigned decimalPlaces, NumberToStringBuffer&);
</ins><span class="cx"> 
</span><ins>+WTF_EXPORT_PRIVATE const char* numberToString(double, NumberToStringBuffer&);
+WTF_EXPORT_PRIVATE const char* numberToFixedPrecisionString(double, unsigned significantFigures, NumberToStringBuffer&, bool truncateTrailingZeros = false);
+WTF_EXPORT_PRIVATE const char* numberToFixedWidthString(double, unsigned decimalPlaces, NumberToStringBuffer&);
+
</ins><span class="cx"> double parseDouble(const LChar* string, size_t length, size_t& parsedLength);
</span><span class="cx"> double parseDouble(const UChar* string, size_t length, size_t& parsedLength);
</span><span class="cx"> double parseDouble(StringView, size_t& parsedLength);
</span><span class="lines">@@ -72,11 +72,10 @@
</span><span class="cx">         return parseDouble(string.characters8(), string.length(), parsedLength);
</span><span class="cx">     return parseDouble(string.characters16(), string.length(), parsedLength);
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span><span class="cx"> using WTF::NumberToStringBuffer;
</span><del>-using WTF::NumberToLStringBuffer;
</del><span class="cx"> using WTF::numberToString;
</span><span class="cx"> using WTF::numberToFixedPrecisionString;
</span><span class="cx"> using WTF::numberToFixedWidthString;
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringConcatenateNumbersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringConcatenateNumbers.h (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringConcatenateNumbers.h     2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WTF/wtf/text/StringConcatenateNumbers.h        2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">     StringTypeAdapter(FloatingPoint number)
</span><span class="cx">     {
</span><span class="cx">         numberToString(number, m_buffer);
</span><del>-        m_length = std::strlen(m_buffer);
</del><ins>+        m_length = std::strlen(&m_buffer[0]);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     unsigned length() const { return m_length; }
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     template<typename CharacterType> void writeTo(CharacterType* destination) const { StringImpl::copyCharacters(destination, buffer(), m_length); }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    const LChar* buffer() const { return reinterpret_cast<const LChar*>(m_buffer); }
</del><ins>+    const LChar* buffer() const { return reinterpret_cast<const LChar*>(&m_buffer[0]); }
</ins><span class="cx"> 
</span><span class="cx">     NumberToStringBuffer m_buffer;
</span><span class="cx">     unsigned m_length;
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     {
</span><span class="cx">         FormattedNumber numberFormatter;
</span><span class="cx">         numberToFixedPrecisionString(number, significantFigures, numberFormatter.m_buffer, trailingZerosTruncatingPolicy == TruncateTrailingZeros);
</span><del>-        numberFormatter.m_length = std::strlen(numberFormatter.m_buffer);
</del><ins>+        numberFormatter.m_length = std::strlen(&numberFormatter.m_buffer[0]);
</ins><span class="cx">         return numberFormatter;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -97,12 +97,12 @@
</span><span class="cx">     {
</span><span class="cx">         FormattedNumber numberFormatter;
</span><span class="cx">         numberToFixedWidthString(number, decimalPlaces, numberFormatter.m_buffer);
</span><del>-        numberFormatter.m_length = std::strlen(numberFormatter.m_buffer);
</del><ins>+        numberFormatter.m_length = std::strlen(&numberFormatter.m_buffer[0]);
</ins><span class="cx">         return numberFormatter;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     unsigned length() const { return m_length; }
</span><del>-    const LChar* buffer() const { return reinterpret_cast<const LChar*>(m_buffer); }
</del><ins>+    const LChar* buffer() const { return reinterpret_cast<const LChar*>(&m_buffer[0]); }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     NumberToStringBuffer m_buffer;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WebCore/ChangeLog      2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2019-02-27  Darin Adler  <darin@apple.com>
+
+        Fixed makeString(float) to do shortest-form serialization without first converting to double
+        https://bugs.webkit.org/show_bug.cgi?id=195142
+
+        Reviewed by Daniel Bates.
+
+        * platform/graphics/Color.cpp: Removed unneeded include of DecimalNumber.h.
+
</ins><span class="cx"> 2019-03-02  Simon Fraser  <simon.fraser@apple.com>
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r242132): Incorrect positioning with multiple position:fixed elements
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsColorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/Color.cpp (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/Color.cpp 2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WebCore/platform/graphics/Color.cpp    2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include "AnimationUtilities.h"
</span><span class="cx"> #include "HashTools.h"
</span><span class="cx"> #include <wtf/Assertions.h>
</span><del>-#include <wtf/DecimalNumber.h>
</del><span class="cx"> #include <wtf/HexNumber.h>
</span><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="cx"> #include <wtf/text/StringBuilder.h>
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WebKit/ChangeLog       2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2019-02-27  Darin Adler  <darin@apple.com>
+
+        Fixed makeString(float) to do shortest-form serialization without first converting to double
+        https://bugs.webkit.org/show_bug.cgi?id=195142
+
+        Reviewed by Daniel Bates.
+
+        * UIProcess/PerActivityStateCPUUsageSampler.cpp: Removed unneeded include of DecimalNumber.h.
+
</ins><span class="cx"> 2019-03-02  Adrian Perez de Castro  <aperez@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [WPE] Public API headers are missing autocleanup definitions
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessPerActivityStateCPUUsageSamplercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/PerActivityStateCPUUsageSampler.cpp (242315 => 242316)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/PerActivityStateCPUUsageSampler.cpp        2019-03-02 20:50:08 UTC (rev 242315)
+++ trunk/Source/WebKit/UIProcess/PerActivityStateCPUUsageSampler.cpp   2019-03-02 20:54:59 UTC (rev 242316)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include "WebProcessPool.h"
</span><span class="cx"> #include "WebProcessProxy.h"
</span><span class="cx"> #include <WebCore/DiagnosticLoggingKeys.h>
</span><del>-#include <wtf/DecimalNumber.h>
</del><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> using namespace WebCore;
</span></span></pre>
</div>
</div>

</body>
</html>