mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibWeb: Define a PropertyIDOrCustomPropertyName type
We often want to identify a property, but if we have a PropertyID we don't want to have to convert it to a string to then convert it back again. However, custom properties don't have a useful PropertyID. So, here's a type with a verbose name.
This commit is contained in:
committed by
Tim Ledbetter
parent
cd4ea67706
commit
1ff1093a24
Notes:
github-actions[bot]
2025-07-09 15:46:02 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/1ff1093a24a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5226 Reviewed-by: https://github.com/tcl3 ✅
@@ -182,6 +182,7 @@ ErrorOr<void> generate_header_file(JsonObject& properties, JsonObject&, Core::Fi
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Traits.h>
|
||||
#include <AK/Variant.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibWeb/CSS/Enums.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
@@ -255,6 +256,8 @@ enum class PropertyID : @property_id_underlying_type@ {
|
||||
generator.append(R"~~~(
|
||||
};
|
||||
|
||||
using PropertyIDOrCustomPropertyName = Variant<PropertyID, FlyString>;
|
||||
|
||||
enum class AnimationType {
|
||||
Discrete,
|
||||
ByComputedValue,
|
||||
|
||||
Reference in New Issue
Block a user