Bug 229775 - Implement atan, acos, asin, atan2 calc functions
Summary: Implement atan, acos, asin, atan2 calc functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nikos Mouchtaris
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-01 16:06 PDT by Nikos Mouchtaris
Modified: 2021-09-23 15:01 PDT (History)
11 users (show)

See Also:


Attachments
Patch (16.58 KB, patch)
2021-09-01 16:08 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff
Patch (35.16 KB, patch)
2021-09-15 12:41 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff
Patch (35.16 KB, patch)
2021-09-15 15:32 PDT, Nikos Mouchtaris
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (35.15 KB, patch)
2021-09-15 15:58 PDT, Nikos Mouchtaris
simon.fraser: review+
Details | Formatted Diff | Diff
asin,acos,atan,atan2 (37.47 KB, patch)
2021-09-20 20:04 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff
inverse trig functions (42.55 KB, patch)
2021-09-21 13:03 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff
inverse trig functions (40.40 KB, patch)
2021-09-21 13:58 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff
inverse trig functions (40.86 KB, patch)
2021-09-21 15:07 PDT, Nikos Mouchtaris
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Mouchtaris 2021-09-01 16:06:28 PDT
Implement atan, acos, asin, atan2 calc functions
Comment 1 Nikos Mouchtaris 2021-09-01 16:08:03 PDT
Created attachment 437076 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2021-09-07 13:43:03 PDT
<rdar://problem/82837327>
Comment 3 Nikos Mouchtaris 2021-09-15 12:41:38 PDT
Created attachment 438279 [details]
Patch
Comment 4 EWS Watchlist 2021-09-15 12:42:30 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
Comment 5 Nikos Mouchtaris 2021-09-15 15:32:57 PDT
Created attachment 438298 [details]
Patch
Comment 6 Nikos Mouchtaris 2021-09-15 15:58:19 PDT
Created attachment 438299 [details]
Patch
Comment 7 Simon Fraser (smfr) 2021-09-15 16:59:28 PDT
Comment on attachment 438299 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Tests: imported/w3c/web-platform-tests/css/css-values/acos-asin-atan-atan2-computed.html

Words here please (like a spec link etc).

> Source/WebCore/css/calc/CSSCalcOperationNode.cpp:490
> +
>  

Too many blank lines.

> Source/WebCore/css/calc/CSSCalcOperationNode.cpp:-441
> -        return;

Is this removal significant?

> Source/WebCore/css/calc/CSSCalcOperationNode.cpp:630
> +        auto newChild = CSSCalcPrimitiveValueNode::create(CSSPrimitiveValue::create(resolvedValue, CSSUnitType::CSS_DEG));

Is it CSS_DEG because the spec says that degrees are the canonical angle unit?

> Source/WebCore/css/calc/CSSCalcOperationNode.cpp:1133
> +        return rad2deg(std::asin(children[0]));

Maybe link to the part of the spec that explains why returning angles in degrees is correct.

> Source/WebCore/css/calc/CSSCalcOperationNode.cpp:1138
> +        return rad2deg(std::asin(children[0]));

acts, not asin? Why did tests not catch this.

> Source/WebCore/css/calc/CSSCalcOperationNode.cpp:1143
> +        return rad2deg(std::asin(children[0]));

asin -> atan? Again, where is the test coverage.
Comment 8 Nikos Mouchtaris 2021-09-20 20:04:01 PDT
Created attachment 438772 [details]
asin,acos,atan,atan2
Comment 9 Nikos Mouchtaris 2021-09-21 13:03:51 PDT
Created attachment 438846 [details]
inverse trig functions
Comment 10 Nikos Mouchtaris 2021-09-21 13:58:10 PDT
Created attachment 438855 [details]
inverse trig functions
Comment 11 Nikos Mouchtaris 2021-09-21 15:07:13 PDT
Created attachment 438863 [details]
inverse trig functions
Comment 12 EWS 2021-09-23 15:01:24 PDT
Committed r283013 (242078@main): <https://commits.webkit.org/242078@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438863 [details].