Created attachment 8875133 [details] baz.html Consider the attached testcase. In Gecko, the two percentages on each line are the same. In stylo, the following lines have them different: 15% 15.000001%; 27% 27.000002%; 30% 30.000002%; 53% 52.999996%; 54% 54.000004%; 59% 58.999996%; 60% 60.000004%; This was caught by some mochitests. Specifically, this causes dom/base/test/test_bug338679.html to fail. Good thing it happened to use "15" as the value... If I had to guess, servo is taking floats, converting to double, then serializing the double.
Actually, looks like Gecko just asks the float-to-string machinery to produce 6 decimal digits of precision, rounding the last one; this is the general behavior of nsTSubstring_CharT::AppendFloat (the version that takes 32-bit floats). The errors above are all in the 8th digit, so they get rounded away.