diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Percentage.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Percentage.h b/Userland/Libraries/LibWeb/CSS/Percentage.h index e0716407ee..3ee0a60ef9 100644 --- a/Userland/Libraries/LibWeb/CSS/Percentage.h +++ b/Userland/Libraries/LibWeb/CSS/Percentage.h @@ -11,6 +11,7 @@ #include <LibWeb/CSS/Angle.h> #include <LibWeb/CSS/Frequency.h> #include <LibWeb/CSS/Length.h> +#include <LibWeb/CSS/Number.h> #include <LibWeb/CSS/Time.h> namespace Web::CSS { @@ -209,6 +210,14 @@ public: virtual Time resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const&, Layout::Node const&, Time const& reference_value) const override; }; +struct NumberPercentage : public PercentageOr<Number> { +public: + using PercentageOr<Number>::PercentageOr; + + bool is_number() const { return is_t(); } + Number const& number() const { return get_t(); } +}; + } template<> |