mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb/CSS: Add parsing for <opentype-tag>
This is a special form of `<string>` so doesn't need its own style value type. It's used in a couple of font-related properties. For completeness it's included in ValueType.
This commit is contained in:
@@ -35,6 +35,7 @@ static bool type_name_is_enum(StringView type_name)
|
||||
"integer"sv,
|
||||
"length"sv,
|
||||
"number"sv,
|
||||
"opentype-tag"sv,
|
||||
"paint"sv,
|
||||
"percentage"sv,
|
||||
"position"sv,
|
||||
@@ -235,6 +236,7 @@ enum class ValueType {
|
||||
Integer,
|
||||
Length,
|
||||
Number,
|
||||
OpenTypeTag,
|
||||
Paint,
|
||||
Percentage,
|
||||
Position,
|
||||
@@ -805,6 +807,8 @@ bool property_accepts_type(PropertyID property_id, ValueType value_type)
|
||||
property_generator.appendln(" case ValueType::Length:");
|
||||
} else if (type_name == "number") {
|
||||
property_generator.appendln(" case ValueType::Number:");
|
||||
} else if (type_name == "opentype-tag") {
|
||||
property_generator.appendln(" case ValueType::OpenTypeTag:");
|
||||
} else if (type_name == "paint") {
|
||||
property_generator.appendln(" case ValueType::Paint:");
|
||||
} else if (type_name == "percentage") {
|
||||
|
||||
Reference in New Issue
Block a user