ladybird/Libraries/LibWeb/CSS/StyleProperty.h
Tim Ledbetter df23b42b37 LibWeb: Don't store custom name on StyleProperty
This reduces time spent in `~StyleProperty()` from 2.18% to 0.67% on
https://cloudflare.com.
2025-11-12 11:19:37 +01:00

34 lines
567 B
C++

/*
* Copyright (c) 2023, Andreas Kling <andreas@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/FlyString.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;
FlyString name {};
};
}