LibWeb: Support font-stretch SVG presentation attribute
Some checks failed
CI / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (arm64, Sanitizer, false, macOS, ["macos-15", "self-hosted"], Clang) (push) Has been cancelled
CI / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (x86_64, Fuzzers, false, Linux, ["blacksmith-16vcpu-ubuntu-2404"], Clang) (push) Has been cancelled
CI / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (x86_64, Sanitizer, false, Linux, ["blacksmith-16vcpu-ubuntu-2404"], GNU) (push) Has been cancelled
CI / ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} (x86_64, Sanitizer, true, Linux, ["blacksmith-16vcpu-ubuntu-2404"], Clang) (push) Has been cancelled
Build Dev Container Image / build (push) Has been cancelled
Run test262 and test-wasm / run_and_update_results (push) Has been cancelled
Lint Code / lint (push) Has been cancelled
Label PRs with merge conflicts / auto-labeler (push) Has been cancelled
Push notes / build (push) Has been cancelled

This commit is contained in:
Tim Ledbetter
2025-10-11 07:38:57 +01:00
committed by Sam Atkins
parent 14be5106d7
commit 1c10421316
4 changed files with 14 additions and 11 deletions

View File

@@ -34,12 +34,16 @@ void SVGElement::initialize(JS::Realm& realm)
}
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)
, name(CSS::string_from_property_id(property_id))
, name(move(name))
, 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;
FlyString name;
@@ -72,6 +76,7 @@ static ReadonlySpan<NamedPropertyID> attribute_style_properties()
NamedPropertyID(CSS::PropertyID::FontStyle),
NamedPropertyID(CSS::PropertyID::FontVariant),
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::ImageRendering),
NamedPropertyID(CSS::PropertyID::LetterSpacing),

View File

@@ -2,8 +2,7 @@ Harness status: OK
Found 48 tests
47 Pass
1 Fail
48 Pass
Pass clip-path 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
@@ -19,7 +18,7 @@ Pass flood-color 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-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-variant presentation attribute supported on an irrelevant element
Pass font-weight presentation attribute supported on an irrelevant element

View File

@@ -2,8 +2,8 @@ Harness status: OK
Found 58 tests
56 Pass
2 Fail
57 Pass
1 Fail
Pass clip-path 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
@@ -21,7 +21,7 @@ Pass flood-color 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-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-variant presentation attribute supported on a relevant element
Pass font-weight presentation attribute supported on a relevant element

View File

@@ -2,8 +2,7 @@ Harness status: OK
Found 48 tests
47 Pass
1 Fail
48 Pass
Pass clip-path 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
@@ -19,7 +18,7 @@ Pass flood-color 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-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-variant presentation attribute supported on an unknown SVG element
Pass font-weight presentation attribute supported on an unknown SVG element