mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-24 16:40:21 +00:00
LibWeb: Update property_id_from_string() generator to handle ::Custom
This commit is contained in:
parent
a1687854ab
commit
0448d4d609
Notes:
github-actions[bot]
2024-11-21 12:17:33 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/0448d4d6096 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2460 Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 4 additions and 0 deletions
|
@ -402,6 +402,7 @@ ErrorOr<void> generate_implementation_file(JsonObject& properties, Core::File& f
|
||||||
#include <LibWeb/CSS/Enums.h>
|
#include <LibWeb/CSS/Enums.h>
|
||||||
#include <LibWeb/CSS/Parser/Parser.h>
|
#include <LibWeb/CSS/Parser/Parser.h>
|
||||||
#include <LibWeb/CSS/PropertyID.h>
|
#include <LibWeb/CSS/PropertyID.h>
|
||||||
|
#include <LibWeb/CSS/PropertyName.h>
|
||||||
#include <LibWeb/CSS/CSSStyleValue.h>
|
#include <LibWeb/CSS/CSSStyleValue.h>
|
||||||
#include <LibWeb/CSS/StyleValues/PercentageStyleValue.h>
|
#include <LibWeb/CSS/StyleValues/PercentageStyleValue.h>
|
||||||
#include <LibWeb/CSS/StyleValues/TimeStyleValue.h>
|
#include <LibWeb/CSS/StyleValues/TimeStyleValue.h>
|
||||||
|
@ -436,6 +437,9 @@ Optional<PropertyID> property_id_from_camel_case_string(StringView string)
|
||||||
|
|
||||||
Optional<PropertyID> property_id_from_string(StringView string)
|
Optional<PropertyID> property_id_from_string(StringView string)
|
||||||
{
|
{
|
||||||
|
if (is_a_custom_property_name_string(string))
|
||||||
|
return PropertyID::Custom;
|
||||||
|
|
||||||
if (Infra::is_ascii_case_insensitive_match(string, "all"sv))
|
if (Infra::is_ascii_case_insensitive_match(string, "all"sv))
|
||||||
return PropertyID::All;
|
return PropertyID::All;
|
||||||
)~~~");
|
)~~~");
|
||||||
|
|
Loading…
Reference in a new issue