| // Copyright 2017 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // CSSNumericValue is the base class for numeric and length typed CSS Values. |
| // https://drafts.css-houdini.org/css-typed-om/#numeric-objects |
| [ |
| Exposed(Window CSSTypedOM, PaintWorklet CSSTypedOM) |
| ] interface CSSNumericValue : CSSStyleValue { |
| [RaisesException, NewObject] CSSNumericValue add(CSSNumericValue value); |
| [RaisesException, NewObject] CSSNumericValue sub(CSSNumericValue value); |
| [RaisesException, NewObject] CSSNumericValue mul(double value); |
| [RaisesException, NewObject] CSSNumericValue div(double value); |
| |
| [RaisesException, NewObject] CSSNumericValue to(DOMString unit); |
| |
| // Putting Exposed=Window in the next line makes |parse| not exposed to PaintWorklet. |
| [RaisesException, NewObject, Exposed=Window] static CSSNumericValue parse(DOMString cssText); |
| }; |