mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Support font-stretch SVG presentation attribute
This commit is contained in:
parent
14be5106d7
commit
1c10421316
Notes:
github-actions[bot]
2025-10-11 07:13:42 +00:00
Author: https://github.com/tcl3
Commit: 1c10421316
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6446
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 14 additions and 11 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue