[webkit-reviews] review granted: [Bug 229507] Implement sin, cos, tan, e and pi for calc : [Attachment 436967] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 7 21:01:45 PDT 2021


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Nikos Mouchtaris
<nmouchtaris at apple.com>'s request for review:
Bug 229507: Implement sin, cos, tan, e and pi for calc
https://bugs.webkit.org/show_bug.cgi?id=229507

Attachment 436967: Patch

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




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

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

Are there WPT for these trig functions? Can we contribute some?

> Source/WebCore/css/calc/CSSCalcOperationNode.cpp:366
> +    return adoptRef(new CSSCalcOperationNode(CalculationCategory::Number,
op, WTFMove(values)));

Normally we avoid calling bare 'new' and instead give classes a static create()
function. But I see you're following existing code here.

> LayoutTests/css3/calc/trig-functions-with-constants.html:31
> +		   testValue('calc(sin(30deg + 1.0471967rad ) * 100px)',
'100');

Do you test lack of units  - tan(0.3) ?


More information about the webkit-reviews mailing list