CSS calc function should evaluate and parse infinity and NaN
According to the newest version of CSS standard [1], calc function could return an infinity or NaN value when the expression has an infinity keyword without NaN product (like inf-inf) or the division by zero. Therefore, this initial feature implementation evaluate the expression or keywords infinity value to std::numeric_limits<double>::infinity() and NaN value to std::numeric_limits<double>::quiet_NaN(). Also, this patch contains the infinity and NaN value serialization. Design docs: [2] Feature Status: [3] Intent to prototype: [4] [1] https://drafts.csswg.org/css-values/#calc-type-checking [2] https://bit.ly/349gXjq [3] https://chromestatus.com/feature/5657825571241984 [4] https://groups.google.com/a/chromium.org/g/blink-dev/c/4cT9dMkzVXE/m/aCT8B6PDAwAJ Bug: 1133390 Change-Id: Id543e9f9af446de623ecee00ba4a3e03100096b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2465414Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:
Mason Freed <masonfreed@chromium.org> Commit-Queue: Seokho Song <0xdevssh@gmail.com> Cr-Commit-Position: refs/heads/master@{#845066}
Showing
Please register or sign in to comment