@@ -3594,12 +3594,25 @@ Serialization</h3>
35943594 then serialize the value as normal
35953595 and return the result.
35963596
3597- 2. Let |s| be a [=string=] that initially contains
3597+ 2. If |fn| represents an infinite or NaN value:
3598+ 1. Let |s| be the [=string=] "calc(".
3599+ 2. Create a numeric value
3600+ in the [=canonical unit=] for |fn|'s [=CSSNumericValue/type=]
3601+ (such as ''px'' for <<length>> ),
3602+ with a value of 1 if |fn| represents +∞,
3603+ a value of -1 if |fn| represents −∞,
3604+ or a value of 0 if |fn| represents NaN.
3605+ Serialize this numeric value
3606+ and append it to |s|.
3607+ 3. Append " / 0)" to |s|,
3608+ and return |s|.
3609+
3610+ 3. Let |s| be a [=string=] that initially contains
35983611 the |fn|'s name
35993612 (such as "calc", "sin", etc)
36003613 followed by a "(" (open parenthesis).
36013614
3602- 3 . For each comma-separated [=calculation=] argument of |fn|,
3615+ 4 . For each comma-separated [=calculation=] argument of |fn|,
36033616 [=serialize the calculation tree=] .
36043617 If a result of this starts with a "(" (open parenthesis)
36053618 and ends with a ")" (close parenthesis),
@@ -3608,9 +3621,9 @@ Serialization</h3>
36083621 using ", " (comma followed by space),
36093622 then append the result to |s|.
36103623
3611- 4 . Append ")" (close parenthesis) to |s|.
3624+ 5 . Append ")" (close parenthesis) to |s|.
36123625
3613- 5 . Return |s|.
3626+ 6 . Return |s|.
36143627 </div>
36153628
36163629 <div algorithm>
0 commit comments