mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
LibWeb: Rename NumericStyleValue -> NumberStyleValue
This is in preparation of splitting off a separate IntegerStyleValue.
This commit is contained in:
parent
1a6a4ca7d4
commit
ad8565011c
11 changed files with 69 additions and 69 deletions
|
@ -7,11 +7,11 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "NumericStyleValue.h"
|
||||
#include "NumberStyleValue.h"
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
ErrorOr<String> NumericStyleValue::to_string() const
|
||||
ErrorOr<String> NumberStyleValue::to_string() const
|
||||
{
|
||||
return m_value.visit(
|
||||
[](auto value) {
|
|
@ -13,16 +13,16 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
class NumericStyleValue : public StyleValueWithDefaultOperators<NumericStyleValue> {
|
||||
class NumberStyleValue : public StyleValueWithDefaultOperators<NumberStyleValue> {
|
||||
public:
|
||||
static ErrorOr<ValueComparingNonnullRefPtr<NumericStyleValue>> create_float(float value)
|
||||
static ErrorOr<ValueComparingNonnullRefPtr<NumberStyleValue>> create_float(float value)
|
||||
{
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) NumericStyleValue(value));
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) NumberStyleValue(value));
|
||||
}
|
||||
|
||||
static ErrorOr<ValueComparingNonnullRefPtr<NumericStyleValue>> create_integer(i64 value)
|
||||
static ErrorOr<ValueComparingNonnullRefPtr<NumberStyleValue>> create_integer(i64 value)
|
||||
{
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) NumericStyleValue(value));
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) NumberStyleValue(value));
|
||||
}
|
||||
|
||||
float number() const
|
||||
|
@ -37,11 +37,11 @@ public:
|
|||
|
||||
virtual ErrorOr<String> to_string() const override;
|
||||
|
||||
bool properties_equal(NumericStyleValue const& other) const { return m_value == other.m_value; }
|
||||
bool properties_equal(NumberStyleValue const& other) const { return m_value == other.m_value; }
|
||||
|
||||
private:
|
||||
explicit NumericStyleValue(Variant<float, i64> value)
|
||||
: StyleValueWithDefaultOperators(Type::Numeric)
|
||||
explicit NumberStyleValue(Variant<float, i64> value)
|
||||
: StyleValueWithDefaultOperators(Type::Number)
|
||||
, m_value(move(value))
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue