
Turns out we create a lot of these, mostly from places that don't return ErrorOr. The yak stack grows.
33 lines
852 B
C++
33 lines
852 B
C++
/*
|
|
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/CSS/StyleValue.h>
|
|
|
|
namespace Web::CSS {
|
|
|
|
class InitialStyleValue final : public StyleValueWithDefaultOperators<InitialStyleValue> {
|
|
public:
|
|
static ErrorOr<ValueComparingNonnullRefPtr<InitialStyleValue>> the()
|
|
{
|
|
static ValueComparingNonnullRefPtr<InitialStyleValue> instance = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) InitialStyleValue));
|
|
return instance;
|
|
}
|
|
virtual ~InitialStyleValue() override = default;
|
|
|
|
ErrorOr<String> to_string() const override { return "initial"_string; }
|
|
|
|
bool properties_equal(InitialStyleValue const&) const { return true; }
|
|
|
|
private:
|
|
InitialStyleValue()
|
|
: StyleValueWithDefaultOperators(Type::Initial)
|
|
{
|
|
}
|
|
};
|
|
|
|
}
|