mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-15 20:49:41 +00:00
LibWeb/CSS: Implement "Create a sum value"
This commit is contained in:
parent
1c952b01ac
commit
80abffd2e8
Notes:
github-actions[bot]
2025-09-12 11:46:44 +00:00
Author: https://github.com/AtkinsSJ
Commit: 80abffd2e8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6162
Reviewed-by: https://github.com/gmta ✅
17 changed files with 320 additions and 1 deletions
|
@ -28,6 +28,13 @@ struct CSSNumericType {
|
|||
// https://drafts.css-houdini.org/css-typed-om-1/#typedefdef-cssnumberish
|
||||
using CSSNumberish = Variant<double, GC::Root<CSSNumericValue>>;
|
||||
|
||||
// https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue-sum-value
|
||||
struct SumValueItem {
|
||||
double value;
|
||||
UnitMap unit_map;
|
||||
};
|
||||
using SumValue = Vector<SumValueItem>;
|
||||
|
||||
// https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue
|
||||
class CSSNumericValue : public CSSStyleValue {
|
||||
WEB_PLATFORM_OBJECT(CSSNumericValue, CSSStyleValue);
|
||||
|
@ -45,6 +52,8 @@ public:
|
|||
bool equals_for_bindings(Vector<CSSNumberish>) const;
|
||||
virtual bool is_equal_numeric_value(GC::Ref<CSSNumericValue> other) const = 0;
|
||||
|
||||
virtual Optional<SumValue> create_a_sum_value() const = 0;
|
||||
|
||||
CSSNumericType type_for_bindings() const;
|
||||
NumericType const& type() const { return m_type; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue