You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-color-4] Big number serialization problem #296
Line:
test_computed_value("color", "color(display-p3 184 1.00001 2347329746587)", "color(display-p3 184 1.00001 2347329700000)", "[Display P3 color with component > 1 should not clamp]");
The whole point of this test is making sure that no clamping to 1 happens right? There's no need to use a massive number, can we just tweak the test to use, I dunno, 1000 rather than 2347329746587?
The precision imposed by the spec is here, where you need 10 bits at least for display-p3.
I haven't done the math but I'm not sure that number would necessarily round-trip with a half-float or a 10-bit representation for components.
@emilio the test was tweaked to use 234732 instead of 2347329746587, but do you mean we don't need the (split out) serialization test for big numbers at all?
The tests use the color() function, but I assume the same difference can be observed with many property values. I wouldn't be surprised if there are difference in serialization in different contexts, so testing a few different things from different eras of CSS would be good.
Given the name of "Display P3 color with component > 1 should not clamp", it seems like we can reduce the value we're using in the test to anything > 1, and we definitely don't need a number anywhere near as high as the number currently in the test. As such, it seems reasonable to keep the test in Interop with a vastly lower value (like 1000, as @emilio suggested).
If people in Interop believe the CSS WG should specify what the actual range that round-trips is (which CSS has historically shied away from, thus historic problems with decimal percentages and max z-index values, which has affected the majority of browser engines at some point), that seems like something to (once again) take to the CSS WG.
Activity
foolip commentedon Mar 7, 2023
This split makes sense to me, since serialization is a generic problem. If we can agree in this issue we don't need to spend meeting time on it.
@jgraham WDYT for Gecko?
@jensimmons WDYT for WebKit?
jgraham commentedon Mar 7, 2023
I'm going to defer to @emilio
emilio commentedon Mar 7, 2023
The whole point of this test is making sure that no clamping to 1 happens right? There's no need to use a massive number, can we just tweak the test to use, I dunno,
1000rather than2347329746587?The precision imposed by the spec is here, where you need 10 bits at least for display-p3.
I haven't done the math but I'm not sure that number would necessarily round-trip with a half-float or a 10-bit representation for components.
foolip commentedon Mar 7, 2023
@emilio the test was tweaked to use 234732 instead of 2347329746587, but do you mean we don't need the (split out) serialization test for big numbers at all?
emilio commentedon Mar 7, 2023
Probably they'd be useful? But they are not specific to
<color>at all right?foolip commentedon Mar 7, 2023
The tests use the
color()function, but I assume the same difference can be observed with many property values. I wouldn't be surprised if there are difference in serialization in different contexts, so testing a few different things from different eras of CSS would be good.gsnedders commentedon Mar 16, 2023
Given the name of "Display P3 color with component > 1 should not clamp", it seems like we can reduce the value we're using in the test to anything > 1, and we definitely don't need a number anywhere near as high as the number currently in the test. As such, it seems reasonable to keep the test in Interop with a vastly lower value (like 1000, as @emilio suggested).
If people in Interop believe the CSS WG should specify what the actual range that round-trips is (which CSS has historically shied away from, thus historic problems with decimal percentages and max
z-indexvalues, which has affected the majority of browser engines at some point), that seems like something to (once again) take to the CSS WG.[css-color-4] Change the test for serialization of extreme values
[css-color-4] Change the test for serialization of extreme values
[css-color-4] Change the test for serialization of extreme values
[css-color-4] Change the test for serialization of extreme values
[css-color-4] Change the test for serialization of extreme values
foolip commentedon Mar 29, 2023
https://chromium-review.googlesource.com/c/chromium/src/+/4303721 has landed
[css-color-4] Change the test for serialization of extreme values
Bug 1819931 [wpt PR 38787] - [css-color-4] Change the test for serial…
Bug 1819931 [wpt PR 38787] - [css-color-4] Change the test for serial…