[webkit-reviews] review granted: [Bug 231044] Allow NaN, infinity, and -infinity in calc : [Attachment 439915] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 1 15:17:35 PDT 2021


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Nikos Mouchtaris
<nmouchtaris at apple.com>'s request for review:
Bug 231044: Allow NaN, infinity, and -infinity in calc
https://bugs.webkit.org/show_bug.cgi?id=231044

Attachment 439915: Patch

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




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

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

> Source/WebCore/css/CSSPrimitiveValue.cpp:955
> +    if (m_value.num == -1*std::numeric_limits<double>::infinity())

Spaces around *

> Source/WebCore/css/CSSValueKeywords.in:1369
> +INFINITY

Why is this capitalized?

> Source/WebCore/css/calc/CSSCalcExpressionNodeParser.cpp:100
> +    return { { CSSValuePi, CSSUnitType::CSS_NUMBER, piDouble }, { CSSValueE,
CSSUnitType::CSS_NUMBER, std::exp(1.0) }, { CSSValueInfinity,
CSSUnitType::CSS_NUMBER, -1*std::numeric_limits<double>::infinity() }, {
CSSValueINFINITY, CSSUnitType::CSS_NUMBER,
std::numeric_limits<double>::infinity() }, { CSSValueNaN,
CSSUnitType::CSS_NUMBER, std::numeric_limits<double>::quiet_NaN() } };

This need wrapping. CSSValueINFINITY is ugly.


More information about the webkit-reviews mailing list