LibWeb/CSS: Implement CSSMathValue

This is a base class for the various math functions, so it's not used
directly anywhere.
This commit is contained in:
Sam Atkins 2025-08-19 14:24:39 +01:00 committed by Andreas Kling
commit 6c8876cdb8
Notes: github-actions[bot] 2025-08-29 10:00:11 +00:00
8 changed files with 96 additions and 3 deletions

View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2025, Sam Atkins <sam@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "CSSMathValue.h"
#include <LibWeb/Bindings/Intrinsics.h>
namespace Web::CSS {
GC_DEFINE_ALLOCATOR(CSSMathValue);
CSSMathValue::CSSMathValue(JS::Realm& realm, Bindings::CSSMathOperator operator_, NumericType type)
: CSSNumericValue(realm, move(type))
, m_operator(operator_)
{
}
void CSSMathValue::initialize(JS::Realm& realm)
{
WEB_SET_PROTOTYPE_FOR_INTERFACE(CSSMathValue);
Base::initialize(realm);
}
}