mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00: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:
parent
cd4ea67706
commit
1ff1093a24
Notes:
github-actions[bot]
2025-07-09 15:46:02 +00:00
Author: https://github.com/AtkinsSJ
Commit: 1ff1093a24
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5226
Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue