The following page: <div id="test"></div> <script> test.style.color = 'rgba(0, 0, 0, 0.1)'; alert(getComputedStyle(test).color); </script> shows "rgba(0, 0, 0, 0.098)" in Stylo but "rgba(0, 0, 0, 0.1)" in Gecko. Apparently Stylo's behavior is undesired here. layout/style/test/test_computed_style.html checks this.
Manish, since you are handling color rounding issue recently, I guess you may have some insight to this.
Known and being fixed in bug 1340484
Status: NEW → RESOLVED
Last Resolved: 11 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1340484
I'd note that the Gecko serialization behavior here is quite subtle, and uses different numbers of decimal places depending on what will round-trip correctly. See nsStyleUtil::ColorComponentToFloat.
Yeah, but these specific numbers are just the rounding behavior (in fact the rounding of 0.1 is how I found the original bug). That alpha value renders differently in servo and gecko. Serializing is another beast, and I have not yet fixed that part. Feel free to reopen this just for the serialization thing.
You need to log in before you can comment on or make changes to this bug.