mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 07:33:20 +00:00
Compare commits
2 commits
0cae8dd712
...
1c10421316
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1c10421316 | ||
![]() |
14be5106d7 |
4 changed files with 23 additions and 17 deletions
|
@ -34,12 +34,16 @@ void SVGElement::initialize(JS::Realm& realm)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct NamedPropertyID {
|
struct NamedPropertyID {
|
||||||
NamedPropertyID(CSS::PropertyID property_id, Vector<FlyString> supported_elements = {})
|
NamedPropertyID(CSS::PropertyID property_id, FlyString name, Vector<FlyString> supported_elements = {})
|
||||||
: id(property_id)
|
: id(property_id)
|
||||||
, name(CSS::string_from_property_id(property_id))
|
, name(move(name))
|
||||||
, supported_elements(move(supported_elements))
|
, supported_elements(move(supported_elements))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
NamedPropertyID(CSS::PropertyID property_id, Vector<FlyString> supported_elements = {})
|
||||||
|
: NamedPropertyID(property_id, CSS::string_from_property_id(property_id), move(supported_elements))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
CSS::PropertyID id;
|
CSS::PropertyID id;
|
||||||
FlyString name;
|
FlyString name;
|
||||||
|
@ -48,6 +52,7 @@ struct NamedPropertyID {
|
||||||
|
|
||||||
static ReadonlySpan<NamedPropertyID> attribute_style_properties()
|
static ReadonlySpan<NamedPropertyID> attribute_style_properties()
|
||||||
{
|
{
|
||||||
|
// https://svgwg.org/svg2-draft/styling.html#PresentationAttributes
|
||||||
static Array const properties = {
|
static Array const properties = {
|
||||||
// FIXME: The `fill` attribute and CSS `fill` property are not the same! But our support is limited enough that they are equivalent for now.
|
// FIXME: The `fill` attribute and CSS `fill` property are not the same! But our support is limited enough that they are equivalent for now.
|
||||||
NamedPropertyID(CSS::PropertyID::Fill),
|
NamedPropertyID(CSS::PropertyID::Fill),
|
||||||
|
@ -69,7 +74,9 @@ static ReadonlySpan<NamedPropertyID> attribute_style_properties()
|
||||||
NamedPropertyID(CSS::PropertyID::FontFamily),
|
NamedPropertyID(CSS::PropertyID::FontFamily),
|
||||||
NamedPropertyID(CSS::PropertyID::FontSize),
|
NamedPropertyID(CSS::PropertyID::FontSize),
|
||||||
NamedPropertyID(CSS::PropertyID::FontStyle),
|
NamedPropertyID(CSS::PropertyID::FontStyle),
|
||||||
|
NamedPropertyID(CSS::PropertyID::FontVariant),
|
||||||
NamedPropertyID(CSS::PropertyID::FontWeight),
|
NamedPropertyID(CSS::PropertyID::FontWeight),
|
||||||
|
NamedPropertyID(CSS::PropertyID::FontWidth, "font-stretch"_fly_string),
|
||||||
NamedPropertyID(CSS::PropertyID::Height, { SVG::TagNames::foreignObject, SVG::TagNames::image, SVG::TagNames::rect, SVG::TagNames::svg, SVG::TagNames::symbol, SVG::TagNames::use }),
|
NamedPropertyID(CSS::PropertyID::Height, { SVG::TagNames::foreignObject, SVG::TagNames::image, SVG::TagNames::rect, SVG::TagNames::svg, SVG::TagNames::symbol, SVG::TagNames::use }),
|
||||||
NamedPropertyID(CSS::PropertyID::ImageRendering),
|
NamedPropertyID(CSS::PropertyID::ImageRendering),
|
||||||
NamedPropertyID(CSS::PropertyID::LetterSpacing),
|
NamedPropertyID(CSS::PropertyID::LetterSpacing),
|
||||||
|
@ -94,6 +101,7 @@ static ReadonlySpan<NamedPropertyID> attribute_style_properties()
|
||||||
NamedPropertyID(CSS::PropertyID::StrokeOpacity),
|
NamedPropertyID(CSS::PropertyID::StrokeOpacity),
|
||||||
NamedPropertyID(CSS::PropertyID::StrokeWidth),
|
NamedPropertyID(CSS::PropertyID::StrokeWidth),
|
||||||
NamedPropertyID(CSS::PropertyID::TextAnchor),
|
NamedPropertyID(CSS::PropertyID::TextAnchor),
|
||||||
|
NamedPropertyID(CSS::PropertyID::TextDecoration),
|
||||||
NamedPropertyID(CSS::PropertyID::TextRendering),
|
NamedPropertyID(CSS::PropertyID::TextRendering),
|
||||||
NamedPropertyID(CSS::PropertyID::TextOverflow),
|
NamedPropertyID(CSS::PropertyID::TextOverflow),
|
||||||
NamedPropertyID(CSS::PropertyID::TransformOrigin),
|
NamedPropertyID(CSS::PropertyID::TransformOrigin),
|
||||||
|
|
|
@ -2,8 +2,7 @@ Harness status: OK
|
||||||
|
|
||||||
Found 48 tests
|
Found 48 tests
|
||||||
|
|
||||||
45 Pass
|
48 Pass
|
||||||
3 Fail
|
|
||||||
Pass clip-path presentation attribute supported on an irrelevant element
|
Pass clip-path presentation attribute supported on an irrelevant element
|
||||||
Pass clip-rule presentation attribute supported on an irrelevant element
|
Pass clip-rule presentation attribute supported on an irrelevant element
|
||||||
Pass color presentation attribute supported on an irrelevant element
|
Pass color presentation attribute supported on an irrelevant element
|
||||||
|
@ -19,9 +18,9 @@ Pass flood-color presentation attribute supported on an irrelevant element
|
||||||
Pass flood-opacity presentation attribute supported on an irrelevant element
|
Pass flood-opacity presentation attribute supported on an irrelevant element
|
||||||
Pass font-family presentation attribute supported on an irrelevant element
|
Pass font-family presentation attribute supported on an irrelevant element
|
||||||
Pass font-size presentation attribute supported on an irrelevant element
|
Pass font-size presentation attribute supported on an irrelevant element
|
||||||
Fail font-stretch presentation attribute supported on an irrelevant element
|
Pass font-stretch presentation attribute supported on an irrelevant element
|
||||||
Pass font-style presentation attribute supported on an irrelevant element
|
Pass font-style presentation attribute supported on an irrelevant element
|
||||||
Fail font-variant presentation attribute supported on an irrelevant element
|
Pass font-variant presentation attribute supported on an irrelevant element
|
||||||
Pass font-weight presentation attribute supported on an irrelevant element
|
Pass font-weight presentation attribute supported on an irrelevant element
|
||||||
Pass image-rendering presentation attribute supported on an irrelevant element
|
Pass image-rendering presentation attribute supported on an irrelevant element
|
||||||
Pass letter-spacing presentation attribute supported on an irrelevant element
|
Pass letter-spacing presentation attribute supported on an irrelevant element
|
||||||
|
@ -43,7 +42,7 @@ Pass stroke-miterlimit presentation attribute supported on an irrelevant element
|
||||||
Pass stroke-opacity presentation attribute supported on an irrelevant element
|
Pass stroke-opacity presentation attribute supported on an irrelevant element
|
||||||
Pass stroke-width presentation attribute supported on an irrelevant element
|
Pass stroke-width presentation attribute supported on an irrelevant element
|
||||||
Pass text-anchor presentation attribute supported on an irrelevant element
|
Pass text-anchor presentation attribute supported on an irrelevant element
|
||||||
Fail text-decoration presentation attribute supported on an irrelevant element
|
Pass text-decoration presentation attribute supported on an irrelevant element
|
||||||
Pass text-overflow presentation attribute supported on an irrelevant element
|
Pass text-overflow presentation attribute supported on an irrelevant element
|
||||||
Pass text-rendering presentation attribute supported on an irrelevant element
|
Pass text-rendering presentation attribute supported on an irrelevant element
|
||||||
Pass transform-origin presentation attribute supported on an irrelevant element
|
Pass transform-origin presentation attribute supported on an irrelevant element
|
||||||
|
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
||||||
|
|
||||||
Found 58 tests
|
Found 58 tests
|
||||||
|
|
||||||
54 Pass
|
57 Pass
|
||||||
4 Fail
|
1 Fail
|
||||||
Pass clip-path presentation attribute supported on a relevant element
|
Pass clip-path presentation attribute supported on a relevant element
|
||||||
Pass clip-rule presentation attribute supported on a relevant element
|
Pass clip-rule presentation attribute supported on a relevant element
|
||||||
Pass color presentation attribute supported on a relevant element
|
Pass color presentation attribute supported on a relevant element
|
||||||
|
@ -21,9 +21,9 @@ Pass flood-color presentation attribute supported on a relevant element
|
||||||
Pass flood-opacity presentation attribute supported on a relevant element
|
Pass flood-opacity presentation attribute supported on a relevant element
|
||||||
Pass font-family presentation attribute supported on a relevant element
|
Pass font-family presentation attribute supported on a relevant element
|
||||||
Pass font-size presentation attribute supported on a relevant element
|
Pass font-size presentation attribute supported on a relevant element
|
||||||
Fail font-stretch presentation attribute supported on a relevant element
|
Pass font-stretch presentation attribute supported on a relevant element
|
||||||
Pass font-style presentation attribute supported on a relevant element
|
Pass font-style presentation attribute supported on a relevant element
|
||||||
Fail font-variant presentation attribute supported on a relevant element
|
Pass font-variant presentation attribute supported on a relevant element
|
||||||
Pass font-weight presentation attribute supported on a relevant element
|
Pass font-weight presentation attribute supported on a relevant element
|
||||||
Pass height presentation attribute supported on a relevant element
|
Pass height presentation attribute supported on a relevant element
|
||||||
Pass image-rendering presentation attribute supported on a relevant element
|
Pass image-rendering presentation attribute supported on a relevant element
|
||||||
|
@ -49,7 +49,7 @@ Pass stroke-miterlimit presentation attribute supported on a relevant element
|
||||||
Pass stroke-opacity presentation attribute supported on a relevant element
|
Pass stroke-opacity presentation attribute supported on a relevant element
|
||||||
Pass stroke-width presentation attribute supported on a relevant element
|
Pass stroke-width presentation attribute supported on a relevant element
|
||||||
Pass text-anchor presentation attribute supported on a relevant element
|
Pass text-anchor presentation attribute supported on a relevant element
|
||||||
Fail text-decoration presentation attribute supported on a relevant element
|
Pass text-decoration presentation attribute supported on a relevant element
|
||||||
Pass text-overflow presentation attribute supported on a relevant element
|
Pass text-overflow presentation attribute supported on a relevant element
|
||||||
Pass text-rendering presentation attribute supported on a relevant element
|
Pass text-rendering presentation attribute supported on a relevant element
|
||||||
Pass transform-origin presentation attribute supported on a relevant element
|
Pass transform-origin presentation attribute supported on a relevant element
|
||||||
|
|
|
@ -2,8 +2,7 @@ Harness status: OK
|
||||||
|
|
||||||
Found 48 tests
|
Found 48 tests
|
||||||
|
|
||||||
45 Pass
|
48 Pass
|
||||||
3 Fail
|
|
||||||
Pass clip-path presentation attribute supported on an unknown SVG element
|
Pass clip-path presentation attribute supported on an unknown SVG element
|
||||||
Pass clip-rule presentation attribute supported on an unknown SVG element
|
Pass clip-rule presentation attribute supported on an unknown SVG element
|
||||||
Pass color presentation attribute supported on an unknown SVG element
|
Pass color presentation attribute supported on an unknown SVG element
|
||||||
|
@ -19,9 +18,9 @@ Pass flood-color presentation attribute supported on an unknown SVG element
|
||||||
Pass flood-opacity presentation attribute supported on an unknown SVG element
|
Pass flood-opacity presentation attribute supported on an unknown SVG element
|
||||||
Pass font-family presentation attribute supported on an unknown SVG element
|
Pass font-family presentation attribute supported on an unknown SVG element
|
||||||
Pass font-size presentation attribute supported on an unknown SVG element
|
Pass font-size presentation attribute supported on an unknown SVG element
|
||||||
Fail font-stretch presentation attribute supported on an unknown SVG element
|
Pass font-stretch presentation attribute supported on an unknown SVG element
|
||||||
Pass font-style presentation attribute supported on an unknown SVG element
|
Pass font-style presentation attribute supported on an unknown SVG element
|
||||||
Fail font-variant presentation attribute supported on an unknown SVG element
|
Pass font-variant presentation attribute supported on an unknown SVG element
|
||||||
Pass font-weight presentation attribute supported on an unknown SVG element
|
Pass font-weight presentation attribute supported on an unknown SVG element
|
||||||
Pass image-rendering presentation attribute supported on an unknown SVG element
|
Pass image-rendering presentation attribute supported on an unknown SVG element
|
||||||
Pass letter-spacing presentation attribute supported on an unknown SVG element
|
Pass letter-spacing presentation attribute supported on an unknown SVG element
|
||||||
|
@ -43,7 +42,7 @@ Pass stroke-miterlimit presentation attribute supported on an unknown SVG elemen
|
||||||
Pass stroke-opacity presentation attribute supported on an unknown SVG element
|
Pass stroke-opacity presentation attribute supported on an unknown SVG element
|
||||||
Pass stroke-width presentation attribute supported on an unknown SVG element
|
Pass stroke-width presentation attribute supported on an unknown SVG element
|
||||||
Pass text-anchor presentation attribute supported on an unknown SVG element
|
Pass text-anchor presentation attribute supported on an unknown SVG element
|
||||||
Fail text-decoration presentation attribute supported on an unknown SVG element
|
Pass text-decoration presentation attribute supported on an unknown SVG element
|
||||||
Pass text-overflow presentation attribute supported on an unknown SVG element
|
Pass text-overflow presentation attribute supported on an unknown SVG element
|
||||||
Pass text-rendering presentation attribute supported on an unknown SVG element
|
Pass text-rendering presentation attribute supported on an unknown SVG element
|
||||||
Pass transform-origin presentation attribute supported on an unknown SVG element
|
Pass transform-origin presentation attribute supported on an unknown SVG element
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue