[webkit-changes] [WebKit/WebKit] f452d4: Support mixed percentage and length/number argumen...

Cameron McCormack noreply at github.com
Sat Aug 19 11:14:08 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f452d441b0232de141054206c0bd5ae0ab4e2bc0
      https://github.com/WebKit/WebKit/commit/f452d441b0232de141054206c0bd5ae0ab4e2bc0
  Author: Cameron McCormack <heycam at apple.com>
  Date:   2023-08-19 (Sat, 19 Aug 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-computed-expected.txt
    M Source/WebCore/css/calc/CSSCalcOperationNode.cpp

  Log Message:
  -----------
  Support mixed percentage and length/number arguments in CSS step functions
https://bugs.webkit.org/show_bug.cgi?id=259714
rdar://problem/113234898

Reviewed by Tim Nguyen.

We shouldn't just check that the two numeric argumnets to round() etc.
have the same value category, but if one is Percent then we should
support Length or Number as the other, and produce an overall
LengthPercent or NumberPercent category.

Fix another bug in this code, where we currently check that the numeric
arguments aren't isRoundOperation(), but this should be
isRoundConstant(). Otherwise values like round(round(10, 5), 2) are
rejected.

* LayoutTests/imported/w3c/web-platform-tests/css/css-values/round-mod-rem-computed-expected.txt:
* Source/WebCore/css/calc/CSSCalcOperationNode.cpp:
(WebCore::resolvedTypeForStep):
(WebCore::CSSCalcOperationNode::createStep):
(WebCore::CSSCalcOperationNode::createRound):
(WebCore::validateRoundChildren): Deleted.

Canonical link: https://commits.webkit.org/267072@main




More information about the webkit-changes mailing list