[webkit-reviews] review granted: [Bug 238401] Clamp degenerate calc() values for <angle> : [Attachment 455827] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 28 15:17:46 PDT 2022


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Nikos Mouchtaris
<nmouchtaris at apple.com>'s request for review:
Bug 238401: Clamp degenerate calc() values for <angle>
https://bugs.webkit.org/show_bug.cgi?id=238401

Attachment 455827: Patch

https://bugs.webkit.org/attachment.cgi?id=455827&action=review




--- Comment #2 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 455827
  --> https://bugs.webkit.org/attachment.cgi?id=455827
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=455827&action=review

> Source/WebCore/ChangeLog:8
> +	   Clamp nan, infinity and -infinity to zero for <angle>.

Spec (or issue) link here please.

> Source/WebCore/css/calc/CSSCalcValue.cpp:329
> +    if (primitiveType() == CSSUnitType::CSS_DEG && (isnan(value) ||
isinf(value)))
> +	   return 0;

Are we always CSS_DEG here because of canonicalization, or can we end up here
with CSS_RAD, CSS_GRAD etc?


More information about the webkit-reviews mailing list