| // Copyright 2015 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. |
| |
| enum LengthType { |
| "px", "percent", "em", "ex", "ch", "rem", "vw", "vh", "vmin", "vmax", "cm", "mm", "in", "pc", "pt" |
| }; |
| |
| [ |
| Exposed=(Window,PaintWorklet), |
| RuntimeEnabled=CSSTypedOM |
| ] interface CSSLengthValue : CSSStyleValue { |
| [RaisesException, NewObject] CSSLengthValue add(CSSLengthValue other); |
| [RaisesException, NewObject] CSSLengthValue subtract(CSSLengthValue other); |
| [RaisesException, NewObject] CSSLengthValue multiply(double value); |
| [RaisesException, NewObject] CSSLengthValue divide(double value); |
| |
| [RaisesException, NewObject] static CSSLengthValue from(DOMString cssString); |
| [RaisesException, NewObject] static CSSLengthValue from(double value, LengthType type); |
| [RaisesException, NewObject] static CSSLengthValue from(CalcDictionary dictionary); |
| }; |