RESOLVED FIXED 258730
Prevent counter values from over/underflowing
https://bugs.webkit.org/show_bug.cgi?id=258730
Summary Prevent counter values from over/underflowing
Ahmad Saleem
Reported 2023-06-30 07:23:13 PDT
Hi Team, While going through Blink's commits, I came across where we fail over/underflowing Layout Test on WebKit ToT: Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/e18ac62b00618f26ef125554dd8241b2aed711e9 WebKit ToT Result: FAIL large reset does not overflow assert_array_equals: expected property 4 to be 2000000000 but got -1794967296 (expected array [500000000, 1000000000, 1500000000, 2000000000, 2000000000] got [500000000, 1000000000, 1500000000, 2000000000, -1794967296]) FAIL small reset does not underflow assert_array_equals: expected property 4 to be -2000000000 but got 1794967296 (expected array [-500000000, -1000000000, -1500000000, -2000000000, -2000000000] got [-500000000, -1000000000, -1500000000, -2000000000, 1794967296]) Just wanted to raise this bug so we can fix it. Since Vitor and Tim were doing counter-* related fix, so tagging them. Thanks!
Attachments
Radar WebKit Bug Importer
Comment 1 2023-07-04 08:19:26 PDT
Vitor Roriz
Comment 2 2023-07-04 08:28:19 PDT
I'll have a look. Thanks for reporting it.
Vitor Roriz
Comment 3 2023-07-04 10:45:09 PDT
We need to clarify if it should be clamped to the max/min value of the range or if increment should be ignored in this cases. FF and Chrome do the latter, but the spec seems to suggest the former.
Vitor Roriz
Comment 4 2023-07-04 11:33:47 PDT
Vitor Roriz
Comment 5 2023-07-04 14:13:24 PDT
As Elika suggested, I think we can aim for compatibility here. I.E: making WebKit also ignore the counter-increment if it would overflow, but making counter-reset clamp to the valid range if it would overflow.
Vitor Roriz
Comment 6 2023-07-04 14:27:44 PDT
EWS
Comment 7 2023-08-11 08:48:13 PDT
Committed 266817@main (a3717f099f77): <https://commits.webkit.org/266817@main> Reviewed commits have been landed. Closing PR #15549 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.