mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-03 22:59:13 +00:00
What I thought was a spec issue was actually a combination of my own misunderstanding and a bug in our IDL generator. With that bug fixed, I can correct this to how it is in the spec.
46 lines
1.4 KiB
Text
46 lines
1.4 KiB
Text
#import <CSS/CSSStyleValue.idl>
|
|
|
|
// https://drafts.css-houdini.org/css-typed-om-1/#enumdef-cssnumericbasetype
|
|
enum CSSNumericBaseType {
|
|
"length",
|
|
"angle",
|
|
"time",
|
|
"frequency",
|
|
"resolution",
|
|
"flex",
|
|
"percent",
|
|
};
|
|
|
|
// https://drafts.css-houdini.org/css-typed-om-1/#dictdef-cssnumerictype
|
|
dictionary CSSNumericType {
|
|
long length;
|
|
long angle;
|
|
long time;
|
|
long frequency;
|
|
long resolution;
|
|
long flex;
|
|
long percent;
|
|
CSSNumericBaseType percentHint;
|
|
};
|
|
|
|
// https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue
|
|
[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)]
|
|
interface CSSNumericValue : CSSStyleValue {
|
|
[FIXME] CSSNumericValue add(CSSNumberish... values);
|
|
[FIXME] CSSNumericValue sub(CSSNumberish... values);
|
|
[FIXME] CSSNumericValue mul(CSSNumberish... values);
|
|
[FIXME] CSSNumericValue div(CSSNumberish... values);
|
|
[FIXME] CSSNumericValue min(CSSNumberish... values);
|
|
[FIXME] CSSNumericValue max(CSSNumberish... values);
|
|
|
|
[FIXME] boolean equals(CSSNumberish... value);
|
|
|
|
// FIXME: CSSUnitValue to(USVString unit);
|
|
// FIXME: CSSMathSum toSum(USVString... units);
|
|
[ImplementedAs=type_for_bindings] CSSNumericType type();
|
|
|
|
[Exposed=Window] static CSSNumericValue parse(USVString cssText);
|
|
};
|
|
|
|
// https://drafts.css-houdini.org/css-typed-om-1/#typedefdef-cssnumberish
|
|
typedef (double or CSSNumericValue) CSSNumberish;
|