mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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:
parent
f7f8d2fe0d
commit
cd13b30fb8
Notes:
github-actions[bot]
2024-10-02 15:37:57 +00:00
Author: https://github.com/AtkinsSJ
Commit: cd13b30fb8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1599
4 changed files with 37 additions and 1 deletions
|
@ -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") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue