WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
230073
Implement round,mod,rem functions for calc
https://bugs.webkit.org/show_bug.cgi?id=230073
Summary
Implement round,mod,rem functions for calc
Nikos Mouchtaris
Reported
2021-09-08 17:09:12 PDT
Implement round,mod,rem functions for calc
Attachments
Patch
(21.05 KB, patch)
2021-09-08 17:09 PDT
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(42.54 KB, patch)
2021-09-17 11:46 PDT
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(58.70 KB, patch)
2021-09-17 18:24 PDT
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Patch
(66.72 KB, patch)
2021-09-21 16:55 PDT
,
Nikos Mouchtaris
simon.fraser
: review+
Details
Formatted Diff
Diff
round/mod/rem functions
(65.07 KB, patch)
2021-09-24 18:01 PDT
,
Nikos Mouchtaris
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Nikos Mouchtaris
Comment 1
2021-09-08 17:09:26 PDT
Created
attachment 437687
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2021-09-15 17:10:21 PDT
<
rdar://problem/83174669
>
Nikos Mouchtaris
Comment 3
2021-09-17 11:46:33 PDT
Created
attachment 438495
[details]
Patch
EWS Watchlist
Comment 4
2021-09-17 11:47:28 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-09-17 18:24:21 PDT
Created
attachment 438539
[details]
Patch
Nikos Mouchtaris
Comment 6
2021-09-21 16:55:45 PDT
Created
attachment 438888
[details]
Patch
Simon Fraser (smfr)
Comment 7
2021-09-22 15:33:45 PDT
Comment on
attachment 438888
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=438888&action=review
> Source/WebCore/ChangeLog:6 > + Reviewed by NOBODY (OOPS!).
Add blank line below here.
> Source/WebCore/css/calc/CSSCalcOperationNode.cpp:451 > + LOG_WITH_STREAM(Calc, stream << "Failed to create round node because unable to determine category from " << prettyPrintNodes(values));
round -> step
> Source/WebCore/platform/calc/CalcExpressionOperation.cpp:37 > + double lowerB = std::floor(a / std::abs(b))*std::abs(b); > + double upperB = lowerB + std::abs(b);
Maybe avoid calling std::abs(b) threee times. Also space around *
> Source/WebCore/platform/calc/CalcExpressionOperation.cpp:145 > + return std::numeric_limits<double>::quiet_NaN();
Should this ASSERT_NOT_REACHED?
> Source/WebCore/platform/calc/CalcExpressionOperation.cpp:151 > + auto upperB = ret.second; > + return upperB;
No need for upperB
> Source/WebCore/platform/calc/CalcExpressionOperation.cpp:157 > + auto lowerB = ret.first;
Ditto
> Source/WebCore/platform/calc/CalcExpressionOperation.cpp:163 > + auto ret = getNearestMultiples(m_children[0]->evaluate(maxValue), m_children[1]->evaluate(maxValue));
Put m_children[0]->evaluate(maxValue) etc into local variables?
> Source/WebCore/platform/calc/CalcExpressionOperation.cpp:166 > + return std::abs(upperB-m_children[0]->evaluate(maxValue)) <= std::abs(m_children[1]->evaluate(maxValue)) / 2 ? upperB : lowerB;
space around -
Nikos Mouchtaris
Comment 8
2021-09-24 18:01:43 PDT
Created
attachment 439224
[details]
round/mod/rem functions
EWS
Comment 9
2021-09-24 22:03:15 PDT
Committed
r283073
(
242131@main
): <
https://commits.webkit.org/242131@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 439224
[details]
.
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