mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
This inheritance exists for typed-om classes, but StyleValues aren't
typed-om.
Somehow this makes our z-index interpolation slightly more correct. 🎉
22 lines
495 B
C++
22 lines
495 B
C++
/*
|
|
* Copyright (c) 2023-2025, Sam Atkins <sam@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include "IntegerStyleValue.h"
|
|
#include <LibWeb/CSS/Parser/ComponentValue.h>
|
|
|
|
namespace Web::CSS {
|
|
|
|
String IntegerStyleValue::to_string(SerializationMode) const
|
|
{
|
|
return String::number(m_value);
|
|
}
|
|
|
|
Vector<Parser::ComponentValue> IntegerStyleValue::tokenize() const
|
|
{
|
|
return { Parser::Token::create_number(Number { Number::Type::Integer, static_cast<double>(m_value) }) };
|
|
}
|
|
|
|
}
|