ladybird/Libraries/LibWeb/CSS/StyleProperty.h
Andreas Kling d641bfd7e2 LibWeb: Store custom property names as UTF-16
Move PropertyNameAndID, custom property data, registered custom
properties, and Typed OM associated property names to Utf16FlyString.

This removes the FlyString storage boundary from CSS property-name
handling and lets CSSStyleProperties keep the name it receives from
CSSOM instead of converting it back to UTF-8.
2026-06-09 11:48:02 +02:00

34 lines
577 B
C++

/*
* Copyright (c) 2023, Andreas Kling <andreas@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Utf16FlyString.h>
#include <LibWeb/Forward.h>
namespace Web::CSS {
enum class Important : u8 {
No,
Yes,
};
struct WEB_API StyleProperty {
~StyleProperty();
Important important { Important::No };
PropertyID property_id;
NonnullRefPtr<StyleValue const> value;
bool operator==(StyleProperty const& other) const;
};
struct StylePropertyAndName {
StyleProperty property;
Utf16FlyString name {};
};
}