[Webkit-unassigned] [Bug 203312] Implement the CSS exponent functions: pow(), sqrt(), hypot()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 15 14:35:59 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=203312

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

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

> Source/WebCore/css/CSSCalculationValue.cpp:785
> +    bool isExpFuncNode() const { return m_operator == CalcOperator::Hypot || m_operator == CalcOperator::Sqrt || m_operator == CalcOperator::Pow; }

isExponentialFunctionNode()

> Source/WebCore/css/CSSCalculationValue.cpp:792
> +    bool canHaveOnlyChild() const { return m_operator == CalcOperator::Hypot || m_operator == CalcOperator::Sqrt; }

This name is a bit ambiguous. Is it "can have only one child"? Maybe allowsSingleChild()?

> Source/WebCore/css/CSSCalculationValue.cpp:1267
> +        // Don't simplify out sqrt() before its evaluated

its -> it is

> Source/WebCore/css/CSSCalculationValue.cpp:1690
> +            sum += std::pow(child, 2);

(child * child) probably slightly better.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210115/41d2ca85/attachment.htm>


More information about the webkit-unassigned mailing list