Skip to content

[css-typed-om-1] "Serialize a CSSNumericValue" doesn't pass "nested" and "paren-less" to CSSMathValue #1151

@AtkinsSJ

Description

@AtkinsSJ

In the algorithm for serializing CSSMathValue, it repeatedly ends up calling "serialzie a CSSNumericValue", because that's what CSSNumericArray contains. eg:

  1. If this is a CSSMathMin or CSSMathMax:
  2. Append "min(" or "max(" to s, as appropriate.
  3. For each arg in this’s values internal slot, serialize arg with nested and paren-less both true, and append the result to s, appending a ", " between successive values.
  4. Append ")" to s and return s.

However, serialize a CSSNumericValue doesn't make use of those arguments. It only accepts the minimum/maximum arguments that are relevant for CSSUnitValue. It needs to take the nested and paren-less arguments, and then pass them to "serialize a CSSMathValue".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions