1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibWeb: Split InheritStyleValue out of StyleValue.{h,cpp}

This commit is contained in:
Sam Atkins 2023-03-24 16:45:58 +00:00 committed by Linus Groh
parent e61a5ad180
commit 44c9a5b648
4 changed files with 35 additions and 20 deletions

View file

@ -627,26 +627,6 @@ private:
NonnullOwnPtr<CalcSum> m_expression;
};
class InheritStyleValue final : public StyleValueWithDefaultOperators<InheritStyleValue> {
public:
static ValueComparingNonnullRefPtr<InheritStyleValue> the()
{
static ValueComparingNonnullRefPtr<InheritStyleValue> instance = adopt_ref(*new InheritStyleValue);
return instance;
}
virtual ~InheritStyleValue() override = default;
ErrorOr<String> to_string() const override { return "inherit"_string; }
bool properties_equal(InheritStyleValue const&) const { return true; }
private:
InheritStyleValue()
: StyleValueWithDefaultOperators(Type::Inherit)
{
}
};
class InitialStyleValue final : public StyleValueWithDefaultOperators<InitialStyleValue> {
public:
static ValueComparingNonnullRefPtr<InitialStyleValue> the()