Bug 1776458 [wpt PR 34584] - Fix some css/css-shapes tests that failed due to value...
commit74596c2c6cbf47cc7410c54914ebcdae446d3d27
authorXianzhu Wang <wangxianzhu@chromium.org>
Tue, 28 Jun 2022 11:49:51 +0000 (28 11:49 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Wed, 29 Jun 2022 10:23:56 +0000 (29 10:23 +0000)
tree6011ed541b8983aab7c90fbc0844f886016783f1
parent347e65a1d2cbe10b144192841a8f0b2cd6aefbf1
Bug 1776458 [wpt PR 34584] - Fix some css/css-shapes tests that failed due to value precision, a=testonly

Automatic update from web-platform-tests
Fix some css/css-shapes tests that failed due to value precision

Previously these tests failed on both Chrome and Firefox because the
computed values of some css properties were slightly different from
the expected values. Now add function roundComputedCssNumber() to
round to 6 significant digits following the spec
https://drafts.csswg.org/cssom/#serializing-css-values [1].

[1] Actually the spec isn't very clear if the '6' is the number of
significant digits or the number of digits after the decimal point,
but Firefox, Chrome and Safari all use 6 significant digits.

Bug: 1129522
Change-Id: If84bf75f54d931eb40c38065d0d05cefd54f08d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3722705
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1017875}

--

wpt-commits: 7dd56e2899cea12a92428d2e9e975df05430be05
wpt-pr: 34584
testing/web-platform/tests/css/css-shapes/shape-outside/values/support/parsing-utils.js