Skip to content

[css-typed-om] Minor issue in arithmetic methods add(), min(), and max() of CSSNumericValue #12384

Closed
@johannesodland

Description

@johannesodland

Several of the arithmetic methods are referring to this's unit internal slot.
However, this might be an instance of some other class than CSSUnitValue.
As a result it won't have a unit internal slot.

Example from step 2 of add(...values):

return a new CSSUnitValue whose unit internal slot is set to this’s unit internal slot

This affects the following methods:

The issue can be fixed by defining unit in the steps:

If all of the items in values are CSSUnitValues and have the same unit unit, return a new CSSUnitValue whose unit internal slot is set to unit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions