mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +00:00
LibWeb: Add NumberPercentage CSS type
This type is used quite a bit in CSS filters.
This commit is contained in:
parent
0829aa5df0
commit
84d9a226e6
1 changed files with 9 additions and 0 deletions
|
@ -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<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue