WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
231044
Allow NaN, infinity, and -infinity in calc
https://bugs.webkit.org/show_bug.cgi?id=231044
Summary
Allow NaN, infinity, and -infinity in calc
Nikos Mouchtaris
Reported
2021-09-30 16:24:39 PDT
Allow NaN, infinity, and -infinity in calc
Attachments
Patch
(21.50 KB, patch)
2021-09-30 16:32 PDT
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(24.32 KB, patch)
2021-10-01 14:13 PDT
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(27.00 KB, patch)
2021-10-01 14:56 PDT
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(29.85 KB, patch)
2021-10-01 15:02 PDT
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(30.56 KB, patch)
2021-10-01 16:10 PDT
,
Nikos Mouchtaris
simon.fraser
: review+
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
infinity
(39.09 KB, patch)
2021-10-01 18:54 PDT
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Nikos Mouchtaris
Comment 1
2021-09-30 16:32:37 PDT
Created
attachment 439792
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2021-10-01 10:32:32 PDT
<
rdar://problem/83772269
>
Nikos Mouchtaris
Comment 3
2021-10-01 14:13:17 PDT
Created
attachment 439910
[details]
Patch
EWS Watchlist
Comment 4
2021-10-01 14:14:43 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see
https://trac.webkit.org/wiki/WPTExportProcess
Nikos Mouchtaris
Comment 5
2021-10-01 14:56:42 PDT
Created
attachment 439914
[details]
Patch
Nikos Mouchtaris
Comment 6
2021-10-01 15:02:57 PDT
Created
attachment 439915
[details]
Patch
Simon Fraser (smfr)
Comment 7
2021-10-01 15:17:35 PDT
Comment on
attachment 439915
[details]
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.
Simon Fraser (smfr)
Comment 8
2021-10-01 15:29:57 PDT
Comment on
attachment 439915
[details]
Patch r- for the -infinity confusion
Nikos Mouchtaris
Comment 9
2021-10-01 16:10:16 PDT
Created
attachment 439924
[details]
Patch
Simon Fraser (smfr)
Comment 10
2021-10-01 16:14:43 PDT
Comment on
attachment 439924
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=439924&action=review
> Source/WebCore/css/calc/CSSCalcExpressionNodeParser.cpp:103 > + return { { CSSValuePi, CSSUnitType::CSS_NUMBER, piDouble }, { CSSValueE, CSSUnitType::CSS_NUMBER, std::exp(1.0) }, > + { CSSValueNegativeInfinity, 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() } };
I would wrap this like: return { { CSSValuePi, CSSUnitType::CSS_NUMBER, piDouble }, { CSSValueE, CSSUnitType::CSS_NUMBER, std::exp(1.0) }, { CSSValueNegativeInfinity, 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() }, };
Nikos Mouchtaris
Comment 11
2021-10-01 18:54:01 PDT
Created
attachment 439947
[details]
infinity
EWS
Comment 12
2021-10-01 23:23:04 PDT
Committed
r283434
(
242421@main
): <
https://commits.webkit.org/242421@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 439947
[details]
.
Tim Nguyen (:ntim)
Comment 13
2021-11-07 01:38:16 PST
***
Bug 219832
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug