Intent to Ship: CSS Trigonometric functions

244 views
Skip to first unread message

Seokho Song

unread,
Dec 5, 2022, 10:48:55 PM12/5/22
to blin...@chromium.org

Contact emails

seo...@chromium.org

Explainer

https://github.com/DevSDK/css-trigonometric-functions/blob/main/Explainer.md

Specification

https://www.w3.org/TR/css-values-4/#trig-funcs

Summary

Add trigonometric functions sin(), cos(), tan(), asin(), acos(), atan(), atan2() to CSS math expressions.

Resolving relative length on atan2() has tricky problems. So, Using its double value for now.

FYR: https://crbug.com/1392594 Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1802744 Webkit: https://bugs.webkit.org/show_bug.cgi?id=248513 CSSWG: https://github.com/w3c/csswg-drafts/issues/8169



Blink component

Blink>CSS

Search tags

csstrigonometric functionsincostanasinacosatanatan2

TAG review

Not required

TAG review status

Not applicable

Risks



Interoperability and Compatibility

This feature will improve web compatibility, as we are adding support for a feature that WebKit and Gecko already support



Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1774589)

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=203311)

Web developers: No signals

Other signals:


Debuggability

Automatically supported as a CSS feature in DevTools



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

Flag name

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1190444

Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1190444

Estimated milestones

111


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5165381072191488

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPzLR4KH9tBj26wbiAC%3DYhshFDYv66fM9LW-ZuPmeSDrzzxEyg%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

--
Regards,
Seokho

Yoav Weiss

unread,
Dec 7, 2022, 7:25:05 AM12/7/22
to blink-dev, Seokho Song
LGTM1

On Tuesday, December 6, 2022 at 4:48:55 AM UTC+1 Seokho Song wrote:

It'd be good to augment the explainer with examples of things that developers want to achieve, and which this would make easier.
The current examples are clear, but don't seem extremely useful.
Link to the test suite?

Are these the right tests? Are there others?

Mike Taylor

unread,
Dec 7, 2022, 10:55:52 AM12/7/22
to Yoav Weiss, blink-dev, Seokho Song
LGTM2
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/694bf412-b766-403e-b6ca-5ce6c6608488n%40chromium.org.


Philip Jägenstedt

unread,
Dec 7, 2022, 11:43:23 AM12/7/22
to Mike Taylor, Yoav Weiss, blink-dev, Seokho Song
For atan2(), is the behavior you intent to ship (using its double value) per spec and does it match what Firefox and Safari do? Here are the tests:

If we're just going to match Firefox and Safari, that seems fine.

Philip Jägenstedt

unread,
Dec 7, 2022, 11:48:28 AM12/7/22
to Mike Taylor, Yoav Weiss, blink-dev, Seokho Song
Actually, LGTM3 if the tests in acos-asin-atan-atan2-computed.html pass or match Firefox+Safari, no need to wait further in that case.

Additionally, if the CSSWG updates the spec on atan2() in the coming weeks, can you circle back to this thread with what you recommend we should do? If we can update the implementation before it reaches stable that might be good, but it depends on the details of what's decided.

Seokho Song

unread,
Dec 11, 2022, 11:22:42 PM12/11/22
to blink-dev, Philip Jägenstedt, Yoav Weiss, blink-dev, Seokho Song, Mike Taylor
Thank you all!

On Thursday, December 8, 2022 at 1:48:28 AM UTC+9 Philip Jägenstedt wrote:
Actually, LGTM3 if the tests in acos-asin-atan-atan2-computed.html pass or match Firefox+Safari, no need to wait further in that case.
The tests are matched with safari + firefox. Thanks!

Additionally, if the CSSWG updates the spec on atan2() in the coming weeks, can you circle back to this thread with what you recommend we should do? If we can update the implementation before it reaches stable that might be good, but it depends on the details of what's decided.
Yes, I'll notice here when the spec is updated.

On Wed, Dec 7, 2022 at 5:43 PM Philip Jägenstedt <foo...@chromium.org> wrote:
For atan2(), is the behavior you intent to ship (using its double value) per spec and does it match what Firefox and Safari do? Here are the tests:

If we're just going to match Firefox and Safari, that seems fine.

On Wed, Dec 7, 2022 at 4:55 PM Mike Taylor <mike...@chromium.org> wrote:
LGTM2

On 12/7/22 4:25 AM, Yoav Weiss wrote:
LGTM1

On Tuesday, December 6, 2022 at 4:48:55 AM UTC+1 Seokho Song wrote:

It'd be good to augment the explainer with examples of things that developers want to achieve, and which this would make easier.
The current examples are clear, but don't seem extremely useful.
MDN documents have been created and the documents describe well. So I added the references for those documents and a description about resolving relative length on atan2.
 



Flag name

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1190444

Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1190444

Estimated milestones

111


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5165381072191488

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPzLR4KH9tBj26wbiAC%3DYhshFDYv66fM9LW-ZuPmeSDrzzxEyg%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

--
Regards,
Seokho
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Reply all
Reply to author
Forward
0 new messages