mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWeb/CSS: Separate IntegerSV and NumberSV from CSSUnitValue
This inheritance exists for typed-om classes, but StyleValues aren't
typed-om.
Somehow this makes our z-index interpolation slightly more correct. 🎉
This commit is contained in:
committed by
Tim Ledbetter
parent
51a657ca47
commit
7157d19f56
Notes:
github-actions[bot]
2025-08-08 14:20:36 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/7157d19f560 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5775 Reviewed-by: https://github.com/tcl3 ✅
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "IntegerStyleValue.h"
|
||||
#include <LibWeb/CSS/Parser/ComponentValue.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
@@ -15,7 +16,7 @@ String IntegerStyleValue::to_string(SerializationMode) const
|
||||
|
||||
Vector<Parser::ComponentValue> IntegerStyleValue::tokenize() const
|
||||
{
|
||||
return { Parser::Token::create_number(Number { Number::Type::Integer, value() }) };
|
||||
return { Parser::Token::create_number(Number { Number::Type::Integer, static_cast<double>(m_value) }) };
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user