mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09: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
Notes:
sideshowbarker
2024-07-17 07:08:04 +09:00
Author: https://github.com/MacDue
Commit: 84d9a226e6
Pull-request: https://github.com/SerenityOS/serenity/pull/15123
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/linusg ✅
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