diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index ffb64202cb2..24f01707195 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp index bc422786981..19b64f4b388 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h index 14221a67b05..2502ad04619 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h @@ -622,30 +622,6 @@ private: NonnullOwnPtr m_expression; }; -class TimeStyleValue : public StyleValueWithDefaultOperators { -public: - static ValueComparingNonnullRefPtr create(Time time) - { - return adopt_ref(*new TimeStyleValue(move(time))); - } - virtual ~TimeStyleValue() override { } - - Time const& time() const { return m_time; } - - virtual ErrorOr to_string() const override { return m_time.to_string(); } - - bool properties_equal(TimeStyleValue const& other) const { return m_time == other.m_time; } - -private: - explicit TimeStyleValue(Time time) - : StyleValueWithDefaultOperators(Type::Time) - , m_time(move(time)) - { - } - - Time m_time; -}; - class UnresolvedStyleValue final : public StyleValue { public: static ValueComparingNonnullRefPtr create(Vector&& values, bool contains_var_or_attr) diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/TimeStyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValues/TimeStyleValue.h new file mode 100644 index 00000000000..8cc83ad1182 --- /dev/null +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/TimeStyleValue.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2018-2020, Andreas Kling + * Copyright (c) 2021, Tobias Christiansen + * Copyright (c) 2021-2023, Sam Atkins + * Copyright (c) 2022-2023, MacDue + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include + +namespace Web::CSS { + +class TimeStyleValue : public StyleValueWithDefaultOperators { +public: + static ValueComparingNonnullRefPtr create(Time time) + { + return adopt_ref(*new TimeStyleValue(move(time))); + } + virtual ~TimeStyleValue() override = default; + + Time const& time() const { return m_time; } + + virtual ErrorOr to_string() const override { return m_time.to_string(); } + + bool properties_equal(TimeStyleValue const& other) const { return m_time == other.m_time; } + +private: + explicit TimeStyleValue(Time time) + : StyleValueWithDefaultOperators(Type::Time) + , m_time(move(time)) + { + } + + Time m_time; +}; + +}