More predictable handling of large negative CJK counter values.
Everything is first clamped to [INT_MIN, INT_MAX]. Then, if the value is negative, it will be negated to become positive. This won't work if the value is exactly INT_MIN, though, since INT_MIN (MSB set to 1; all other bits set to 0) has no positive counterpart. So handle this manually. Adding a non-exportable web test for this, since the behavior for such numbers is only defined between -9999 and 9999 [1]. [1] https://www.w3.org/TR/css-counter-styles-3/#complex-cjk Bug: 893954 Change-Id: I9f3bfad6e73623c27f2e1e427a96c45ad81d6265 Reviewed-on: https://chromium-review.googlesource.com/c/1350949Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:
Rune Lillesveen <futhark@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#611066}
Showing
Please register or sign in to comment