mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb/CSS: Implement the "numeric factory" methods (CSS.px() and pals)
This commit is contained in:
parent
24017e4ab7
commit
da88db04cf
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021-2024, Sam Atkins <sam@ladybird.org>
|
||||
* Copyright (c) 2021-2025, Sam Atkins <sam@ladybird.org>
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
#include <LibWeb/CSS/CSS.h>
|
||||
#include <LibWeb/CSS/CSSUnitValue.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/CSS/Parser/Syntax.h>
|
||||
#include <LibWeb/CSS/Parser/SyntaxParsing.h>
|
||||
|
|
@ -143,4 +144,333 @@ WebIDL::ExceptionOr<void> register_property(JS::VM& vm, PropertyDefinition defin
|
|||
return {};
|
||||
}
|
||||
|
||||
// https://drafts.css-houdini.org/css-typed-om-1/#numeric-factory
|
||||
inline GC::Ref<CSSUnitValue> numeric_factory(JS::VM& vm, WebIDL::Double value, FlyString unit)
|
||||
{
|
||||
// All of the above methods must, when called with a double value, return a new CSSUnitValue whose value internal
|
||||
// slot is set to value and whose unit internal slot is set to the name of the method as defined here.
|
||||
return CSSUnitValue::create(*vm.current_realm(), value, move(unit));
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> number(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "number"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> percent(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "percent"_fly_string);
|
||||
}
|
||||
|
||||
// <length>
|
||||
GC::Ref<CSSUnitValue> cap(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "cap"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> ch(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "ch"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> em(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "em"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> ex(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "ex"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> ic(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "ic"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> lh(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "lh"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> rcap(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "rcap"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> rch(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "rch"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> rem(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "rem"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> rex(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "rex"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> ric(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "ric"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> rlh(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "rlh"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> vw(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "vw"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> vh(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "vh"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> vi(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "vi"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> vb(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "vb"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> vmin(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "vmin"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> vmax(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "vmax"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> svw(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "svw"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> svh(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "svh"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> svi(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "svi"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> svb(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "svb"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> svmin(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "svmin"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> svmax(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "svmax"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> lvw(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "lvw"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> lvh(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "lvh"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> lvi(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "lvi"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> lvb(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "lvb"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> lvmin(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "lvmin"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> lvmax(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "lvmax"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> dvw(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "dvw"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> dvh(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "dvh"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> dvi(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "dvi"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> dvb(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "dvb"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> dvmin(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "dvmin"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> dvmax(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "dvmax"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> cqw(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "cqw"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> cqh(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "cqh"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> cqi(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "cqi"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> cqb(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "cqb"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> cqmin(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "cqmin"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> cqmax(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "cqmax"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> cm(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "cm"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> mm(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "mm"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> q(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "q"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> in(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "in"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> pt(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "pt"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> pc(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "pc"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> px(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "px"_fly_string);
|
||||
}
|
||||
|
||||
// <angle>
|
||||
GC::Ref<CSSUnitValue> deg(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "deg"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> grad(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "grad"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> rad(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "rad"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> turn(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "turn"_fly_string);
|
||||
}
|
||||
|
||||
// <time>
|
||||
GC::Ref<CSSUnitValue> s(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "s"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> ms(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "ms"_fly_string);
|
||||
}
|
||||
|
||||
// <frequency>
|
||||
GC::Ref<CSSUnitValue> hz(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "hz"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> k_hz(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "khz"_fly_string);
|
||||
}
|
||||
|
||||
// <resolution>
|
||||
GC::Ref<CSSUnitValue> dpi(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "dpi"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> dpcm(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "dpcm"_fly_string);
|
||||
}
|
||||
|
||||
GC::Ref<CSSUnitValue> dppx(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "dppx"_fly_string);
|
||||
}
|
||||
|
||||
// <flex>
|
||||
GC::Ref<CSSUnitValue> fr(JS::VM& vm, WebIDL::Double value)
|
||||
{
|
||||
return numeric_factory(vm, value, "fr"_fly_string);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2021-2025, Sam Atkins <sam@ladybird.org>
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
#include <AK/StringView.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
#include <LibWeb/WebIDL/Types.h>
|
||||
|
||||
// https://www.w3.org/TR/cssom-1/#namespacedef-css
|
||||
namespace Web::CSS {
|
||||
|
|
@ -29,4 +30,80 @@ WebIDL::ExceptionOr<bool> supports(JS::VM&, StringView condition_text);
|
|||
|
||||
WebIDL::ExceptionOr<void> register_property(JS::VM&, PropertyDefinition definition);
|
||||
|
||||
GC::Ref<CSSUnitValue> number(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> percent(JS::VM&, WebIDL::Double value);
|
||||
|
||||
// <length>
|
||||
GC::Ref<CSSUnitValue> cap(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> ch(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> em(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> ex(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> ic(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> lh(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> rcap(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> rch(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> rem(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> rex(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> ric(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> rlh(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> vw(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> vh(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> vi(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> vb(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> vmin(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> vmax(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> svw(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> svh(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> svi(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> svb(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> svmin(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> svmax(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> lvw(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> lvh(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> lvi(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> lvb(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> lvmin(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> lvmax(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> dvw(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> dvh(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> dvi(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> dvb(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> dvmin(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> dvmax(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> cqw(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> cqh(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> cqi(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> cqb(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> cqmin(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> cqmax(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> cm(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> mm(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> q(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> in(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> pt(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> pc(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> px(JS::VM&, WebIDL::Double value);
|
||||
|
||||
// <angle>
|
||||
GC::Ref<CSSUnitValue> deg(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> grad(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> rad(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> turn(JS::VM&, WebIDL::Double value);
|
||||
|
||||
// <time>
|
||||
GC::Ref<CSSUnitValue> s(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> ms(JS::VM&, WebIDL::Double value);
|
||||
|
||||
// <frequency>
|
||||
GC::Ref<CSSUnitValue> hz(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> k_hz(JS::VM&, WebIDL::Double value);
|
||||
|
||||
// <resolution>
|
||||
GC::Ref<CSSUnitValue> dpi(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> dpcm(JS::VM&, WebIDL::Double value);
|
||||
GC::Ref<CSSUnitValue> dppx(JS::VM&, WebIDL::Double value);
|
||||
|
||||
// <flex>
|
||||
GC::Ref<CSSUnitValue> fr(JS::VM&, WebIDL::Double value);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
#import <CSS/CSSUnitValue.idl>
|
||||
|
||||
dictionary PropertyDefinition {
|
||||
required CSSOMString name;
|
||||
CSSOMString syntax = "*";
|
||||
|
|
@ -15,4 +17,81 @@ namespace CSS {
|
|||
|
||||
// https://www.w3.org/TR/css-properties-values-api-1/#dom-css-registerproperty
|
||||
undefined registerProperty(PropertyDefinition definition);
|
||||
|
||||
// https://drafts.css-houdini.org/css-typed-om-1/#numeric-factory
|
||||
CSSUnitValue number(double value);
|
||||
CSSUnitValue percent(double value);
|
||||
|
||||
// <length>
|
||||
CSSUnitValue cap(double value);
|
||||
CSSUnitValue ch(double value);
|
||||
CSSUnitValue em(double value);
|
||||
CSSUnitValue ex(double value);
|
||||
CSSUnitValue ic(double value);
|
||||
CSSUnitValue lh(double value);
|
||||
CSSUnitValue rcap(double value);
|
||||
CSSUnitValue rch(double value);
|
||||
CSSUnitValue rem(double value);
|
||||
CSSUnitValue rex(double value);
|
||||
CSSUnitValue ric(double value);
|
||||
CSSUnitValue rlh(double value);
|
||||
CSSUnitValue vw(double value);
|
||||
CSSUnitValue vh(double value);
|
||||
CSSUnitValue vi(double value);
|
||||
CSSUnitValue vb(double value);
|
||||
CSSUnitValue vmin(double value);
|
||||
CSSUnitValue vmax(double value);
|
||||
CSSUnitValue svw(double value);
|
||||
CSSUnitValue svh(double value);
|
||||
CSSUnitValue svi(double value);
|
||||
CSSUnitValue svb(double value);
|
||||
CSSUnitValue svmin(double value);
|
||||
CSSUnitValue svmax(double value);
|
||||
CSSUnitValue lvw(double value);
|
||||
CSSUnitValue lvh(double value);
|
||||
CSSUnitValue lvi(double value);
|
||||
CSSUnitValue lvb(double value);
|
||||
CSSUnitValue lvmin(double value);
|
||||
CSSUnitValue lvmax(double value);
|
||||
CSSUnitValue dvw(double value);
|
||||
CSSUnitValue dvh(double value);
|
||||
CSSUnitValue dvi(double value);
|
||||
CSSUnitValue dvb(double value);
|
||||
CSSUnitValue dvmin(double value);
|
||||
CSSUnitValue dvmax(double value);
|
||||
CSSUnitValue cqw(double value);
|
||||
CSSUnitValue cqh(double value);
|
||||
CSSUnitValue cqi(double value);
|
||||
CSSUnitValue cqb(double value);
|
||||
CSSUnitValue cqmin(double value);
|
||||
CSSUnitValue cqmax(double value);
|
||||
CSSUnitValue cm(double value);
|
||||
CSSUnitValue mm(double value);
|
||||
CSSUnitValue Q(double value);
|
||||
CSSUnitValue in(double value);
|
||||
CSSUnitValue pt(double value);
|
||||
CSSUnitValue pc(double value);
|
||||
CSSUnitValue px(double value);
|
||||
|
||||
// <angle>
|
||||
CSSUnitValue deg(double value);
|
||||
CSSUnitValue grad(double value);
|
||||
CSSUnitValue rad(double value);
|
||||
CSSUnitValue turn(double value);
|
||||
|
||||
// <time>
|
||||
CSSUnitValue s(double value);
|
||||
CSSUnitValue ms(double value);
|
||||
|
||||
// <frequency>
|
||||
CSSUnitValue Hz(double value);
|
||||
CSSUnitValue kHz(double value);
|
||||
|
||||
// <resolution>
|
||||
CSSUnitValue dpi(double value);
|
||||
CSSUnitValue dpcm(double value);
|
||||
CSSUnitValue dppx(double value);
|
||||
|
||||
// <flex>
|
||||
CSSUnitValue fr(double value);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,19 +1,334 @@
|
|||
== CSS property descriptors
|
||||
registerProperty writable: true
|
||||
registerProperty configurable: true
|
||||
registerProperty enumerable: true
|
||||
registerProperty value before: function registerProperty() { [native code] }
|
||||
registerProperty value after: replaced
|
||||
svw writable: true
|
||||
svw configurable: true
|
||||
svw enumerable: true
|
||||
svw value before: function svw() { [native code] }
|
||||
svw value after: replaced
|
||||
lvmax writable: true
|
||||
lvmax configurable: true
|
||||
lvmax enumerable: true
|
||||
lvmax value before: function lvmax() { [native code] }
|
||||
lvmax value after: replaced
|
||||
rad writable: true
|
||||
rad configurable: true
|
||||
rad enumerable: true
|
||||
rad value before: function rad() { [native code] }
|
||||
rad value after: replaced
|
||||
ic writable: true
|
||||
ic configurable: true
|
||||
ic enumerable: true
|
||||
ic value before: function ic() { [native code] }
|
||||
ic value after: replaced
|
||||
in writable: true
|
||||
in configurable: true
|
||||
in enumerable: true
|
||||
in value before: function in() { [native code] }
|
||||
in value after: replaced
|
||||
Hz writable: true
|
||||
Hz configurable: true
|
||||
Hz enumerable: true
|
||||
Hz value before: function Hz() { [native code] }
|
||||
Hz value after: replaced
|
||||
pc writable: true
|
||||
pc configurable: true
|
||||
pc enumerable: true
|
||||
pc value before: function pc() { [native code] }
|
||||
pc value after: replaced
|
||||
rch writable: true
|
||||
rch configurable: true
|
||||
rch enumerable: true
|
||||
rch value before: function rch() { [native code] }
|
||||
rch value after: replaced
|
||||
vb writable: true
|
||||
vb configurable: true
|
||||
vb enumerable: true
|
||||
vb value before: function vb() { [native code] }
|
||||
vb value after: replaced
|
||||
number writable: true
|
||||
number configurable: true
|
||||
number enumerable: true
|
||||
number value before: function number() { [native code] }
|
||||
number value after: replaced
|
||||
dpcm writable: true
|
||||
dpcm configurable: true
|
||||
dpcm enumerable: true
|
||||
dpcm value before: function dpcm() { [native code] }
|
||||
dpcm value after: replaced
|
||||
mm writable: true
|
||||
mm configurable: true
|
||||
mm enumerable: true
|
||||
mm value before: function mm() { [native code] }
|
||||
mm value after: replaced
|
||||
cqb writable: true
|
||||
cqb configurable: true
|
||||
cqb enumerable: true
|
||||
cqb value before: function cqb() { [native code] }
|
||||
cqb value after: replaced
|
||||
supports writable: true
|
||||
supports configurable: true
|
||||
supports enumerable: true
|
||||
supports value before: function supports() { [native code] }
|
||||
supports value after: replaced
|
||||
ric writable: true
|
||||
ric configurable: true
|
||||
ric enumerable: true
|
||||
ric value before: function ric() { [native code] }
|
||||
ric value after: replaced
|
||||
dvmin writable: true
|
||||
dvmin configurable: true
|
||||
dvmin enumerable: true
|
||||
dvmin value before: function dvmin() { [native code] }
|
||||
dvmin value after: replaced
|
||||
svmin writable: true
|
||||
svmin configurable: true
|
||||
svmin enumerable: true
|
||||
svmin value before: function svmin() { [native code] }
|
||||
svmin value after: replaced
|
||||
Q writable: true
|
||||
Q configurable: true
|
||||
Q enumerable: true
|
||||
Q value before: function Q() { [native code] }
|
||||
Q value after: replaced
|
||||
pt writable: true
|
||||
pt configurable: true
|
||||
pt enumerable: true
|
||||
pt value before: function pt() { [native code] }
|
||||
pt value after: replaced
|
||||
deg writable: true
|
||||
deg configurable: true
|
||||
deg enumerable: true
|
||||
deg value before: function deg() { [native code] }
|
||||
deg value after: replaced
|
||||
vi writable: true
|
||||
vi configurable: true
|
||||
vi enumerable: true
|
||||
vi value before: function vi() { [native code] }
|
||||
vi value after: replaced
|
||||
rex writable: true
|
||||
rex configurable: true
|
||||
rex enumerable: true
|
||||
rex value before: function rex() { [native code] }
|
||||
rex value after: replaced
|
||||
ex writable: true
|
||||
ex configurable: true
|
||||
ex enumerable: true
|
||||
ex value before: function ex() { [native code] }
|
||||
ex value after: replaced
|
||||
percent writable: true
|
||||
percent configurable: true
|
||||
percent enumerable: true
|
||||
percent value before: function percent() { [native code] }
|
||||
percent value after: replaced
|
||||
rlh writable: true
|
||||
rlh configurable: true
|
||||
rlh enumerable: true
|
||||
rlh value before: function rlh() { [native code] }
|
||||
rlh value after: replaced
|
||||
lvi writable: true
|
||||
lvi configurable: true
|
||||
lvi enumerable: true
|
||||
lvi value before: function lvi() { [native code] }
|
||||
lvi value after: replaced
|
||||
lvmin writable: true
|
||||
lvmin configurable: true
|
||||
lvmin enumerable: true
|
||||
lvmin value before: function lvmin() { [native code] }
|
||||
lvmin value after: replaced
|
||||
dvi writable: true
|
||||
dvi configurable: true
|
||||
dvi enumerable: true
|
||||
dvi value before: function dvi() { [native code] }
|
||||
dvi value after: replaced
|
||||
lvw writable: true
|
||||
lvw configurable: true
|
||||
lvw enumerable: true
|
||||
lvw value before: function lvw() { [native code] }
|
||||
lvw value after: replaced
|
||||
dvw writable: true
|
||||
dvw configurable: true
|
||||
dvw enumerable: true
|
||||
dvw value before: function dvw() { [native code] }
|
||||
dvw value after: replaced
|
||||
turn writable: true
|
||||
turn configurable: true
|
||||
turn enumerable: true
|
||||
turn value before: function turn() { [native code] }
|
||||
turn value after: replaced
|
||||
registerProperty writable: true
|
||||
registerProperty configurable: true
|
||||
registerProperty enumerable: true
|
||||
registerProperty value before: function registerProperty() { [native code] }
|
||||
registerProperty value after: replaced
|
||||
fr writable: true
|
||||
fr configurable: true
|
||||
fr enumerable: true
|
||||
fr value before: function fr() { [native code] }
|
||||
fr value after: replaced
|
||||
cqmin writable: true
|
||||
cqmin configurable: true
|
||||
cqmin enumerable: true
|
||||
cqmin value before: function cqmin() { [native code] }
|
||||
cqmin value after: replaced
|
||||
rcap writable: true
|
||||
rcap configurable: true
|
||||
rcap enumerable: true
|
||||
rcap value before: function rcap() { [native code] }
|
||||
rcap value after: replaced
|
||||
dppx writable: true
|
||||
dppx configurable: true
|
||||
dppx enumerable: true
|
||||
dppx value before: function dppx() { [native code] }
|
||||
dppx value after: replaced
|
||||
rem writable: true
|
||||
rem configurable: true
|
||||
rem enumerable: true
|
||||
rem value before: function rem() { [native code] }
|
||||
rem value after: replaced
|
||||
svh writable: true
|
||||
svh configurable: true
|
||||
svh enumerable: true
|
||||
svh value before: function svh() { [native code] }
|
||||
svh value after: replaced
|
||||
dvh writable: true
|
||||
dvh configurable: true
|
||||
dvh enumerable: true
|
||||
dvh value before: function dvh() { [native code] }
|
||||
dvh value after: replaced
|
||||
vh writable: true
|
||||
vh configurable: true
|
||||
vh enumerable: true
|
||||
vh value before: function vh() { [native code] }
|
||||
vh value after: replaced
|
||||
cap writable: true
|
||||
cap configurable: true
|
||||
cap enumerable: true
|
||||
cap value before: function cap() { [native code] }
|
||||
cap value after: replaced
|
||||
px writable: true
|
||||
px configurable: true
|
||||
px enumerable: true
|
||||
px value before: function px() { [native code] }
|
||||
px value after: replaced
|
||||
grad writable: true
|
||||
grad configurable: true
|
||||
grad enumerable: true
|
||||
grad value before: function grad() { [native code] }
|
||||
grad value after: replaced
|
||||
svmax writable: true
|
||||
svmax configurable: true
|
||||
svmax enumerable: true
|
||||
svmax value before: function svmax() { [native code] }
|
||||
svmax value after: replaced
|
||||
escape writable: true
|
||||
escape configurable: true
|
||||
escape enumerable: true
|
||||
escape value before: function escape() { [native code] }
|
||||
escape value after: replaced
|
||||
cqw writable: true
|
||||
cqw configurable: true
|
||||
cqw enumerable: true
|
||||
cqw value before: function cqw() { [native code] }
|
||||
cqw value after: replaced
|
||||
s writable: true
|
||||
s configurable: true
|
||||
s enumerable: true
|
||||
s value before: function s() { [native code] }
|
||||
s value after: replaced
|
||||
ch writable: true
|
||||
ch configurable: true
|
||||
ch enumerable: true
|
||||
ch value before: function ch() { [native code] }
|
||||
ch value after: replaced
|
||||
vmax writable: true
|
||||
vmax configurable: true
|
||||
vmax enumerable: true
|
||||
vmax value before: function vmax() { [native code] }
|
||||
vmax value after: replaced
|
||||
ms writable: true
|
||||
ms configurable: true
|
||||
ms enumerable: true
|
||||
ms value before: function ms() { [native code] }
|
||||
ms value after: replaced
|
||||
lvh writable: true
|
||||
lvh configurable: true
|
||||
lvh enumerable: true
|
||||
lvh value before: function lvh() { [native code] }
|
||||
lvh value after: replaced
|
||||
vw writable: true
|
||||
vw configurable: true
|
||||
vw enumerable: true
|
||||
vw value before: function vw() { [native code] }
|
||||
vw value after: replaced
|
||||
cqh writable: true
|
||||
cqh configurable: true
|
||||
cqh enumerable: true
|
||||
cqh value before: function cqh() { [native code] }
|
||||
cqh value after: replaced
|
||||
em writable: true
|
||||
em configurable: true
|
||||
em enumerable: true
|
||||
em value before: function em() { [native code] }
|
||||
em value after: replaced
|
||||
dpi writable: true
|
||||
dpi configurable: true
|
||||
dpi enumerable: true
|
||||
dpi value before: function dpi() { [native code] }
|
||||
dpi value after: replaced
|
||||
cqi writable: true
|
||||
cqi configurable: true
|
||||
cqi enumerable: true
|
||||
cqi value before: function cqi() { [native code] }
|
||||
cqi value after: replaced
|
||||
cm writable: true
|
||||
cm configurable: true
|
||||
cm enumerable: true
|
||||
cm value before: function cm() { [native code] }
|
||||
cm value after: replaced
|
||||
vmin writable: true
|
||||
vmin configurable: true
|
||||
vmin enumerable: true
|
||||
vmin value before: function vmin() { [native code] }
|
||||
vmin value after: replaced
|
||||
cqmax writable: true
|
||||
cqmax configurable: true
|
||||
cqmax enumerable: true
|
||||
cqmax value before: function cqmax() { [native code] }
|
||||
cqmax value after: replaced
|
||||
dvb writable: true
|
||||
dvb configurable: true
|
||||
dvb enumerable: true
|
||||
dvb value before: function dvb() { [native code] }
|
||||
dvb value after: replaced
|
||||
lh writable: true
|
||||
lh configurable: true
|
||||
lh enumerable: true
|
||||
lh value before: function lh() { [native code] }
|
||||
lh value after: replaced
|
||||
svi writable: true
|
||||
svi configurable: true
|
||||
svi enumerable: true
|
||||
svi value before: function svi() { [native code] }
|
||||
svi value after: replaced
|
||||
kHz writable: true
|
||||
kHz configurable: true
|
||||
kHz enumerable: true
|
||||
kHz value before: function kHz() { [native code] }
|
||||
kHz value after: replaced
|
||||
dvmax writable: true
|
||||
dvmax configurable: true
|
||||
dvmax enumerable: true
|
||||
dvmax value before: function dvmax() { [native code] }
|
||||
dvmax value after: replaced
|
||||
lvb writable: true
|
||||
lvb configurable: true
|
||||
lvb enumerable: true
|
||||
lvb value before: function lvb() { [native code] }
|
||||
lvb value after: replaced
|
||||
svb writable: true
|
||||
svb configurable: true
|
||||
svb enumerable: true
|
||||
svb value before: function svb() { [native code] }
|
||||
svb value after: replaced
|
||||
== WebAssembly property descriptors
|
||||
compile writable: true
|
||||
compile configurable: true
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ Harness status: OK
|
|||
|
||||
Found 7 tests
|
||||
|
||||
7 Fail
|
||||
Fail CSS.cm() produces cm length
|
||||
Fail CSS.mm() produces mm length
|
||||
Fail CSS.Q() produces q length
|
||||
Fail CSS.in() produces in length
|
||||
Fail CSS.pt() produces pt length
|
||||
Fail CSS.pc() produces pc length
|
||||
Fail CSS.px() produces px length
|
||||
7 Pass
|
||||
Pass CSS.cm() produces cm length
|
||||
Pass CSS.mm() produces mm length
|
||||
Pass CSS.Q() produces q length
|
||||
Pass CSS.in() produces in length
|
||||
Pass CSS.pt() produces pt length
|
||||
Pass CSS.pc() produces pc length
|
||||
Pass CSS.px() produces px length
|
||||
|
|
@ -2,6 +2,6 @@ Harness status: OK
|
|||
|
||||
Found 2 tests
|
||||
|
||||
2 Fail
|
||||
Fail CSS.s() produces s duration
|
||||
Fail CSS.ms() produces ms duration
|
||||
2 Pass
|
||||
Pass CSS.s() produces s duration
|
||||
Pass CSS.ms() produces ms duration
|
||||
|
|
@ -2,16 +2,16 @@ Harness status: OK
|
|||
|
||||
Found 12 tests
|
||||
|
||||
12 Fail
|
||||
Fail CSS.cap() produces cap length
|
||||
Fail CSS.ch() produces ch length
|
||||
Fail CSS.em() produces em length
|
||||
Fail CSS.ex() produces ex length
|
||||
Fail CSS.ic() produces ic length
|
||||
Fail CSS.lh() produces lh length
|
||||
Fail CSS.rcap() produces rcap length
|
||||
Fail CSS.rch() produces rch length
|
||||
Fail CSS.rem() produces rem length
|
||||
Fail CSS.rex() produces rex length
|
||||
Fail CSS.ric() produces ric length
|
||||
Fail CSS.rlh() produces rlh length
|
||||
12 Pass
|
||||
Pass CSS.cap() produces cap length
|
||||
Pass CSS.ch() produces ch length
|
||||
Pass CSS.em() produces em length
|
||||
Pass CSS.ex() produces ex length
|
||||
Pass CSS.ic() produces ic length
|
||||
Pass CSS.lh() produces lh length
|
||||
Pass CSS.rcap() produces rcap length
|
||||
Pass CSS.rch() produces rch length
|
||||
Pass CSS.rem() produces rem length
|
||||
Pass CSS.rex() produces rex length
|
||||
Pass CSS.ric() produces ric length
|
||||
Pass CSS.rlh() produces rlh length
|
||||
|
|
@ -2,6 +2,6 @@ Harness status: OK
|
|||
|
||||
Found 2 tests
|
||||
|
||||
2 Fail
|
||||
Fail CSS.Hz() produces hz frequency
|
||||
Fail CSS.kHz() produces khz frequency
|
||||
2 Pass
|
||||
Pass CSS.Hz() produces hz frequency
|
||||
Pass CSS.kHz() produces khz frequency
|
||||
|
|
@ -2,10 +2,11 @@ Harness status: OK
|
|||
|
||||
Found 6 tests
|
||||
|
||||
6 Fail
|
||||
1 Pass
|
||||
5 Fail
|
||||
Fail Normalizing a <number> returns a number CSSUnitValue
|
||||
Fail Normalizing a <percentage> returns a percent CSSUnitValue
|
||||
Fail Normalizing a <dimension> returns a CSSUnitValue with the correct unit
|
||||
Fail Normalizing a <number> with a unitless zero returns 0
|
||||
Fail Normalizing a <calc> returns simplified expression
|
||||
Fail Normalizing a <dimension> with a unitless zero returns 0px
|
||||
Pass Normalizing a <dimension> with a unitless zero returns 0px
|
||||
|
|
@ -2,11 +2,10 @@ Harness status: OK
|
|||
|
||||
Found 6 tests
|
||||
|
||||
3 Pass
|
||||
3 Fail
|
||||
Fail CSSUnitValue with length unit constructed from IDL serializes correctly
|
||||
Fail CSSUnitValue with unit "percent" constructed from IDL serializes correctly
|
||||
Fail CSSUnitValue with unit "number" constructed from IDL serializes correctly
|
||||
6 Pass
|
||||
Pass CSSUnitValue with length unit constructed from IDL serializes correctly
|
||||
Pass CSSUnitValue with unit "percent" constructed from IDL serializes correctly
|
||||
Pass CSSUnitValue with unit "number" constructed from IDL serializes correctly
|
||||
Pass CSSUnitValue with integer values constructed from IDL serializes correctly
|
||||
Pass CSSKeywordValue from DOMString modified by "value" setter serializes correctly
|
||||
Pass CSSKeywordValue from CSSOM modified by "value" setter serializes correctly
|
||||
|
|
@ -1,3 +1,29 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 24 tests
|
||||
|
||||
24 Fail
|
||||
Fail Constructing a CSSHSL with a number for the hue works as intended.
|
||||
Fail CSSHSL.h can be updated with a a number.
|
||||
Fail Constructing a CSSHSL with degrees for the hue works as intended.
|
||||
Fail CSSHSL.h can be updated with a degrees.
|
||||
Fail Constructing a CSSHSL with radians for the hue works as intended.
|
||||
Fail CSSHSL.h can be updated with a radians.
|
||||
Fail Constructing a CSSHSL with gradians for the hue works as intended.
|
||||
Fail CSSHSL.h can be updated with a gradians.
|
||||
Fail Constructing a CSSHSL with undefined for the hue works as intended.
|
||||
Fail CSSHSL.h can be updated with a undefined.
|
||||
Fail Constructing a CSSHSL with css pixels for hue throws a SyntaxError.
|
||||
Fail Constructing a CSSHSL with css em for hue throws a SyntaxError.
|
||||
Fail CSSHSL can be constructed from three numbers and will get an alpha of 100%.
|
||||
Fail CSSHSL can be constructed from four numbers.
|
||||
Fail Constructing a CSSHSL with CSS.number for s, l or alpha throws a TypeError
|
||||
Fail Updating a CSSHSL with CSS.number for s throws a SyntaxError
|
||||
Fail CSSHSL.s can be updated to a number.
|
||||
Fail CSSHSL.s can be updated with a CSS percent.
|
||||
Fail Updating a CSSHSL with CSS.number for l throws a SyntaxError
|
||||
Fail CSSHSL.l can be updated to a number.
|
||||
Fail CSSHSL.l can be updated with a CSS percent.
|
||||
Fail Updating a CSSHSL with CSS.number for alpha throws a SyntaxError
|
||||
Fail CSSHSL.alpha can be updated to a number.
|
||||
Fail CSSHSL.alpha can be updated with a CSS percent.
|
||||
|
|
@ -1,3 +1,26 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 21 tests
|
||||
|
||||
21 Fail
|
||||
Fail Constructing a CSSHWB with degrees for the hue works as intended.
|
||||
Fail CSSHWB.h can be updated with a degrees.
|
||||
Fail Constructing a CSSHWB with radians for the hue works as intended.
|
||||
Fail CSSHWB.h can be updated with a radians.
|
||||
Fail Constructing a CSSHWB with gradians for the hue works as intended.
|
||||
Fail CSSHWB.h can be updated with a gradians.
|
||||
Fail Constructing a CSSHWB with a number for hue throws a TypeError.
|
||||
Fail Constructing a CSSHWB with undefined for hue throws a TypeError.
|
||||
Fail Constructing a CSSHWB with css pixels for hue throws a SyntaxError.
|
||||
Fail CSSHWB can be constructed from three numbers and will get an alpha of 100%.
|
||||
Fail CSSHWB can be constructed from four numbers.
|
||||
Fail Constructing a CSSHWB with CSS.number for s, l or alpha throws a SyntaxError
|
||||
Fail Updating a CSSHWB with CSS.number for w throws a SyntaxError
|
||||
Fail CSSHWB.w can be updated to a number.
|
||||
Fail CSSHWB.w can be updated with a CSS percent.
|
||||
Fail Updating a CSSHWB with CSS.number for b throws a SyntaxError
|
||||
Fail CSSHWB.b can be updated to a number.
|
||||
Fail CSSHWB.b can be updated with a CSS percent.
|
||||
Fail Updating a CSSHWB with CSS.number for alpha throws a SyntaxError
|
||||
Fail CSSHWB.alpha can be updated to a number.
|
||||
Fail CSSHWB.alpha can be updated with a CSS percent.
|
||||
|
|
@ -1,3 +1,23 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 18 tests
|
||||
|
||||
18 Fail
|
||||
Fail Constructing a CSSLCH with percent for the lightness works as intended.
|
||||
Fail CSSLCH.l can be updated with a percent.
|
||||
Fail Constructing a CSSLCH with number for the lightness works as intended.
|
||||
Fail CSSLCH.l can be updated with a number.
|
||||
Fail Constructing a CSSLCH with css pixels for lightness throws a SyntaxError.
|
||||
Fail Constructing a CSSLCH with degrees for lightness throws a SyntaxError.
|
||||
Fail CSSLCH can be constructed from three numbers and will get an alpha of 100%.
|
||||
Fail CSSLCH can be constructed from four numbers.
|
||||
Fail Constructing a CSSLCH with CSS.number for l, c, h or alpha throws a SyntaxError
|
||||
Fail Updating a CSSLCH with CSS.number for l throws a SyntaxError
|
||||
Fail CSSLCH.l can be updated to a number.
|
||||
Fail CSSLCH.l can be updated with a CSS percent.
|
||||
Fail Updating a CSSLCH with CSS.number for c throws a SyntaxError
|
||||
Fail CSSLCH.c can be updated to a number.
|
||||
Fail CSSLCH.c can be updated with a CSS percent.
|
||||
Fail Updating a CSSLCH with CSS.number for alpha throws a SyntaxError
|
||||
Fail CSSLCH.alpha can be updated to a number.
|
||||
Fail CSSLCH.alpha can be updated with a CSS percent.
|
||||
|
|
@ -1,3 +1,20 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 15 tests
|
||||
|
||||
15 Fail
|
||||
Fail Constructing a CSSLab with percent for the lightness works as intended.
|
||||
Fail CSSLab.l can be updated with a percent.
|
||||
Fail Constructing a CSSLab with number for the lightness works as intended.
|
||||
Fail CSSLab.l can be updated with a number.
|
||||
Fail Constructing a CSSLab with css pixels for lightness throws a SyntaxError.
|
||||
Fail Constructing a CSSLab with degrees for lightness throws a SyntaxError.
|
||||
Fail CSSLab can be constructed from three numbers and will get an alpha of 100%.
|
||||
Fail CSSLab can be constructed from four numbers.
|
||||
Fail Constructing a CSSLab with CSS.number for l or alpha throws a SyntaxError
|
||||
Fail Updating a CSSLab with CSS.number for l throws a SyntaxError
|
||||
Fail CSSLab.l can be updated to a number.
|
||||
Fail CSSLab.l can be updated with a CSS percent.
|
||||
Fail Updating a CSSLab with CSS.number for alpha throws a SyntaxError
|
||||
Fail CSSLab.alpha can be updated to a number.
|
||||
Fail CSSLab.alpha can be updated with a CSS percent.
|
||||
|
|
@ -1,3 +1,23 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 18 tests
|
||||
|
||||
18 Fail
|
||||
Fail Constructing a CSSOKLCH with percent for the lightness works as intended.
|
||||
Fail CSSOKLCH.l can be updated with a percent.
|
||||
Fail Constructing a CSSOKLCH with number for the lightness works as intended.
|
||||
Fail CSSOKLCH.l can be updated with a number.
|
||||
Fail Constructing a CSSOKLCH with css pixels for lightness throws a SyntaxError.
|
||||
Fail Constructing a CSSOKLCH with degrees for lightness throws a SyntaxError.
|
||||
Fail CSSOKLCH can be constructed from three numbers and will get an alpha of 100%.
|
||||
Fail CSSOKLCH can be constructed from four numbers.
|
||||
Fail Constructing a CSSOKLCH with CSS.number for l, c, h or alpha throws a SyntaxError
|
||||
Fail Updating a CSSOKLCH with CSS.number for l throws a SyntaxError
|
||||
Fail CSSOKLCH.l can be updated to a number.
|
||||
Fail CSSOKLCH.l can be updated with a CSS percent.
|
||||
Fail Updating a CSSOKLCH with CSS.number for c throws a SyntaxError
|
||||
Fail CSSOKLCH.c can be updated to a number.
|
||||
Fail CSSOKLCH.c can be updated with a CSS percent.
|
||||
Fail Updating a CSSOKLCH with CSS.number for alpha throws a SyntaxError
|
||||
Fail CSSOKLCH.alpha can be updated to a number.
|
||||
Fail CSSOKLCH.alpha can be updated with a CSS percent.
|
||||
|
|
@ -1,3 +1,20 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 15 tests
|
||||
|
||||
15 Fail
|
||||
Fail Constructing a CSSOKLab with percent for the lightness works as intended.
|
||||
Fail CSSOKLab.l can be updated with a percent.
|
||||
Fail Constructing a CSSOKLab with number for the lightness works as intended.
|
||||
Fail CSSOKLab.l can be updated with a number.
|
||||
Fail Constructing a CSSOKLab with css pixels for lightness throws a SyntaxError.
|
||||
Fail Constructing a CSSOKLab with degrees for lightness throws a SyntaxError.
|
||||
Fail CSSOKLab can be constructed from three numbers and will get an alpha of 100%.
|
||||
Fail CSSOKLab can be constructed from four numbers.
|
||||
Fail Constructing a CSSOKLab with CSS.number for l or alpha throws a SyntaxError
|
||||
Fail Updating a CSSOKLab with CSS.number for l throws a SyntaxError
|
||||
Fail CSSOKLab.l can be updated to a number.
|
||||
Fail CSSOKLab.l can be updated with a CSS percent.
|
||||
Fail Updating a CSSOKLab with CSS.number for alpha throws a SyntaxError
|
||||
Fail CSSOKLab.alpha can be updated to a number.
|
||||
Fail CSSOKLab.alpha can be updated with a CSS percent.
|
||||
|
|
@ -2,38 +2,38 @@ Harness status: OK
|
|||
|
||||
Found 34 tests
|
||||
|
||||
34 Fail
|
||||
Fail CSS.number returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.percent returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.em returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.ex returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.ch returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.ic returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.rem returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.lh returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.rlh returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.vw returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.vh returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.vi returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.vb returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.vmin returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.vmax returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.cm returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.mm returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.Q returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.in returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.pt returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.pc returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.px returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.deg returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.grad returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.rad returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.turn returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.s returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.ms returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.Hz returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.kHz returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.dpi returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.dpcm returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.dppx returns a CSSUnitValue with correct value and unit
|
||||
Fail CSS.fr returns a CSSUnitValue with correct value and unit
|
||||
34 Pass
|
||||
Pass CSS.number returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.percent returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.em returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.ex returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.ch returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.ic returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.rem returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.lh returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.rlh returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.vw returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.vh returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.vi returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.vb returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.vmin returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.vmax returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.cm returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.mm returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.Q returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.in returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.pt returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.pc returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.px returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.deg returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.grad returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.rad returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.turn returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.s returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.ms returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.Hz returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.kHz returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.dpi returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.dpcm returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.dppx returns a CSSUnitValue with correct value and unit
|
||||
Pass CSS.fr returns a CSSUnitValue with correct value and unit
|
||||
|
|
@ -2,13 +2,13 @@ Harness status: OK
|
|||
|
||||
Found 17 tests
|
||||
|
||||
2 Pass
|
||||
15 Fail
|
||||
1 Pass
|
||||
16 Fail
|
||||
Fail Converting a CSSUnitValue to an invalid unit throws SyntaxError
|
||||
Fail Converting a CSSNumericValue with invalid sum value throws TypeError
|
||||
Fail Converting a CSSNumericValue with sum value containing more than one value throws TypeError
|
||||
Pass Converting a CSSUnitValue to an incompatible unit throws TypeError
|
||||
Pass Converting a CSSUnitValue to its own unit returns itself
|
||||
Fail Converting a CSSUnitValue to its own unit returns itself
|
||||
Fail Converting a CSSUnitValue to its canonical unit returns correct value
|
||||
Fail Converting a CSSMathSum to a single unit adds the values
|
||||
Fail Converting a CSSMathProduct to a single unit multiplies the values
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ Harness status: OK
|
|||
|
||||
Found 7 tests
|
||||
|
||||
2 Pass
|
||||
5 Fail
|
||||
6 Pass
|
||||
1 Fail
|
||||
Fail Computed StylePropertyMap contains every CSS property
|
||||
Fail Computed StylePropertyMap contains CSS property declarations in style rules
|
||||
Pass Computed StylePropertyMap contains CSS property declarations in style rules
|
||||
Pass Computed StylePropertyMap contains custom property declarations in style rules
|
||||
Fail Computed StylePropertyMap contains CSS property declarations in inline styles
|
||||
Pass Computed StylePropertyMap contains CSS property declarations in inline styles
|
||||
Pass Computed StylePropertyMap contains custom property declarations in inline rules
|
||||
Fail Computed StylePropertyMap contains computed values and not resolved values
|
||||
Fail Computed StylePropertyMap is live
|
||||
Pass Computed StylePropertyMap contains computed values and not resolved values
|
||||
Pass Computed StylePropertyMap is live
|
||||
|
|
@ -2,11 +2,11 @@ Harness status: OK
|
|||
|
||||
Found 6 tests
|
||||
|
||||
3 Pass
|
||||
3 Fail
|
||||
5 Pass
|
||||
1 Fail
|
||||
Pass Calling StylePropertyMap.getAll with an unsupported property throws a TypeError
|
||||
Pass Calling StylePropertyMap.getAll with a custom property not in the property model returns an empty list
|
||||
Fail Calling StylePropertyMap.getAll with a valid property returns a single element list with the correct entry
|
||||
Fail StylePropertyMap.getAll is case-insensitive
|
||||
Pass Calling StylePropertyMap.getAll with a valid property returns a single element list with the correct entry
|
||||
Pass StylePropertyMap.getAll is case-insensitive
|
||||
Pass Calling StylePropertyMap.getAll with a valid custom property returns a single element list with the correct entry
|
||||
Fail Calling StylePropertyMap.getAll with a list-valued property returns all the values
|
||||
|
|
@ -1,3 +1,20 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 14 tests
|
||||
|
||||
2 Pass
|
||||
12 Fail
|
||||
Pass Calling StylePropertyMap.append with an unsupported property name throws TypeError
|
||||
Pass Calling StylePropertyMap.append with an null property name throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a property that is not list valued throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a shorthand property throws TypeError
|
||||
Fail Calling StylePropertyMap.append with an invalid CSSStyleValue throws TypeError
|
||||
Fail Calling StylePropertyMap.append with an invalid String value throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a mix of valid and invalid values throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a CSSUnparsedValue throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a var ref throws TypeError
|
||||
Fail Appending a list-valued property with CSSStyleValue or String updates its values
|
||||
Fail Appending a list-valued property with list-valued string updates its values
|
||||
Fail StylePropertyMap.append is case-insensitive
|
||||
Fail Appending to a list containing a variable reference should throw
|
||||
Fail Appending to a longhand list containing a variable reference should throw
|
||||
|
|
@ -2,12 +2,12 @@ Harness status: OK
|
|||
|
||||
Found 7 tests
|
||||
|
||||
2 Pass
|
||||
5 Fail
|
||||
4 Pass
|
||||
3 Fail
|
||||
Fail Declared StylePropertyMap only contains properties in the style rule
|
||||
Fail Declared StylePropertyMap contains CSS property declarations in style rules
|
||||
Pass Declared StylePropertyMap contains CSS property declarations in style rules
|
||||
Pass Declared StylePropertyMap does not contain inline styles
|
||||
Fail Declared StylePropertyMap contains custom property declarations
|
||||
Pass Declared StylePropertyMap does not contain properties with invalid values
|
||||
Fail Declared StylePropertyMap contains properties with their last valid value
|
||||
Pass Declared StylePropertyMap contains properties with their last valid value
|
||||
Fail Declared StylePropertyMap is live
|
||||
|
|
@ -2,12 +2,12 @@ Harness status: OK
|
|||
|
||||
Found 7 tests
|
||||
|
||||
3 Pass
|
||||
4 Fail
|
||||
5 Pass
|
||||
2 Fail
|
||||
Pass Calling StylePropertyMap.getAll with an unsupported property throws a TypeError
|
||||
Pass Calling StylePropertyMap.getAll with a property not in the property model returns an empty list
|
||||
Pass Calling StylePropertyMap.getAll with a custom property not in the property model returns an empty list
|
||||
Fail Calling StylePropertyMap.getAll with a valid property returns a single element list with the correct entry
|
||||
Fail StylePropertyMap.getAll is case-insensitive
|
||||
Pass Calling StylePropertyMap.getAll with a valid property returns a single element list with the correct entry
|
||||
Pass StylePropertyMap.getAll is case-insensitive
|
||||
Fail Calling StylePropertyMap.getAll with a valid custom property returns a single element list with the correct entry
|
||||
Fail Calling StylePropertyMap.getAll with a list-valued property returns all the values
|
||||
|
|
@ -1,3 +1,9 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 4 tests
|
||||
|
||||
4 Fail
|
||||
Fail Setting a shorthand with an invalid CSSStyleValue on css rule throws TypeError
|
||||
Fail Setting a shorthand with an invalid String on css rule throws TypeError
|
||||
Fail Setting a shorthand with a CSSStyleValue updates css rule
|
||||
Fail Setting a shorthand with a string updates css rule
|
||||
|
|
@ -1,3 +1,20 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 14 tests
|
||||
|
||||
3 Pass
|
||||
11 Fail
|
||||
Pass Setting a StylePropertyMap with an unsupported property name throws TypeError
|
||||
Pass Setting a StylePropertyMap with an null property name throws TypeError
|
||||
Pass Setting a StylePropertyMap with a descriptor throws TypeError
|
||||
Fail Setting a StylePropertyMap with an invalid CSSStyleValue throws TypeError
|
||||
Fail Setting a StylePropertyMap with an invalid String throws TypeError
|
||||
Fail Setting a non list-valued property with multiple arguments throws TypeError
|
||||
Fail Setting a non list-valued property with list-valued string throws TypeError
|
||||
Fail Setting a list-valued property with a CSSUnparsedValue and other values throws TypeError
|
||||
Fail Setting a list-valued property with a var ref() and other values throws TypeError
|
||||
Fail Setting a property with CSSStyleValue or String updates its value
|
||||
Fail Setting a list-valued property with CSSStyleValue or String updates its values
|
||||
Fail Setting a list-valued property with a list-valued string updates its value
|
||||
Fail Setting a custom property with CSSStyleValue or String updates its value
|
||||
Fail StylePropertyMap.set is case-insensitive
|
||||
|
|
@ -1,3 +1,20 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 14 tests
|
||||
|
||||
2 Pass
|
||||
12 Fail
|
||||
Pass Calling StylePropertyMap.append with an unsupported property name throws TypeError
|
||||
Pass Calling StylePropertyMap.append with an null property name throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a property that is not list valued throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a shorthand property throws TypeError
|
||||
Fail Calling StylePropertyMap.append with an invalid CSSStyleValue throws TypeError
|
||||
Fail Calling StylePropertyMap.append with an invalid String value throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a mix of valid and invalid values throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a CSSUnparsedValue throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a var ref throws TypeError
|
||||
Fail Calling StylePropertyMap.append with a CSSVariableReferenceValue property throws TypeError
|
||||
Fail Appending a list-valued property with CSSStyleValue or String updates its values
|
||||
Fail Appending a list-valued property with list-valued string updates its values
|
||||
Fail StylePropertyMap.append is case-insensitive
|
||||
Fail StylePropertyMap.append rejects appending to CSS-wide keywords
|
||||
|
|
@ -2,12 +2,12 @@ Harness status: OK
|
|||
|
||||
Found 7 tests
|
||||
|
||||
3 Pass
|
||||
4 Fail
|
||||
5 Pass
|
||||
2 Fail
|
||||
Pass Calling StylePropertyMap.getAll with an unsupported property throws a TypeError
|
||||
Pass Calling StylePropertyMap.getAll with a property not in the property model returns an empty list
|
||||
Pass Calling StylePropertyMap.getAll with a custom property not in the property model returns an empty list
|
||||
Fail Calling StylePropertyMap.getAll with a valid property returns a single element list with the correct entry
|
||||
Fail StylePropertyMap.getAll is case-insensitive
|
||||
Pass Calling StylePropertyMap.getAll with a valid property returns a single element list with the correct entry
|
||||
Pass StylePropertyMap.getAll is case-insensitive
|
||||
Fail Calling StylePropertyMap.getAll with a valid custom property returns a single element list with the correct entry
|
||||
Fail Calling StylePropertyMap.getAll with a list-valued property returns all the values
|
||||
|
|
@ -1,3 +1,9 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 4 tests
|
||||
|
||||
4 Fail
|
||||
Fail Setting a shorthand with an invalid CSSStyleValue on inline style throws TypeError
|
||||
Fail Setting a shorthand with an invalid String on inline style throws TypeError
|
||||
Fail Setting a shorthand with a CSSStyleValue updates inline style
|
||||
Fail Setting a shorthand with a string updates inline style
|
||||
|
|
@ -1,3 +1,20 @@
|
|||
Harness status: Error
|
||||
Harness status: OK
|
||||
|
||||
Found 0 tests
|
||||
Found 14 tests
|
||||
|
||||
3 Pass
|
||||
11 Fail
|
||||
Pass Setting a StylePropertyMap with an unsupported property name throws TypeError
|
||||
Pass Setting a StylePropertyMap with an null property name throws TypeError
|
||||
Pass Setting a StylePropertyMap with a descriptor throws TypeError
|
||||
Fail Setting a StylePropertyMap with an invalid CSSStyleValue throws TypeError
|
||||
Fail Setting a StylePropertyMap with an invalid String throws TypeError
|
||||
Fail Setting a non list-valued property with multiple arguments throws TypeError
|
||||
Fail Setting a non list-valued property with list-valued string throws TypeError
|
||||
Fail Setting a list-valued property with a CSSUnparsedValue and other values throws TypeError
|
||||
Fail Setting a list-valued property with a var ref() and other values throws TypeError
|
||||
Fail Setting a property with CSSStyleValue or String updates its value
|
||||
Fail Setting a list-valued property with CSSStyleValue or String updates its values
|
||||
Fail Setting a list-valued property with a list-valued string updates its value
|
||||
Fail Setting a custom property with CSSStyleValue or String updates its value
|
||||
Fail StylePropertyMap.set is case-insensitive
|
||||
Loading…
Reference in New Issue
Block a user