mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
Meta: Add basic-shape
as a CSS property value type
This commit is contained in:
parent
120915048c
commit
0135af6e60
Notes:
sideshowbarker
2024-07-17 11:34:34 +09:00
Author: https://github.com/MacDue
Commit: 0135af6e60
Pull-request: https://github.com/SerenityOS/serenity/pull/24446
3 changed files with 10 additions and 1 deletions
|
@ -22,7 +22,7 @@ bool is_animatable_property(JsonObject& properties, StringView property_name);
|
|||
static bool type_name_is_enum(StringView type_name)
|
||||
{
|
||||
return !AK::first_is_one_of(type_name,
|
||||
"angle"sv, "background-position"sv, "color"sv, "custom-ident"sv, "easing-function"sv, "flex"sv, "frequency"sv, "image"sv,
|
||||
"angle"sv, "background-position"sv, "basic-shape"sv, "color"sv, "custom-ident"sv, "easing-function"sv, "flex"sv, "frequency"sv, "image"sv,
|
||||
"integer"sv, "length"sv, "number"sv, "paint"sv, "percentage"sv, "position"sv, "ratio"sv, "rect"sv,
|
||||
"resolution"sv, "string"sv, "time"sv, "url"sv);
|
||||
}
|
||||
|
@ -180,6 +180,7 @@ NonnullRefPtr<StyleValue> property_initial_value(JS::Realm&, PropertyID);
|
|||
enum class ValueType {
|
||||
Angle,
|
||||
BackgroundPosition,
|
||||
BasicShape,
|
||||
Color,
|
||||
CustomIdent,
|
||||
EasingFunction,
|
||||
|
@ -699,6 +700,8 @@ bool property_accepts_type(PropertyID property_id, ValueType value_type)
|
|||
property_generator.appendln(" case ValueType::Angle:");
|
||||
} else if (type_name == "background-position") {
|
||||
property_generator.appendln(" case ValueType::BackgroundPosition:");
|
||||
} else if (type_name == "basic-shape") {
|
||||
property_generator.appendln(" case ValueType::BasicShape:");
|
||||
} else if (type_name == "color") {
|
||||
property_generator.appendln(" case ValueType::Color:");
|
||||
} else if (type_name == "custom-ident") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue