mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
LibWeb: Store underlying RatioStyleValue values as StyleValues
Previously we stored a fully formed `Ratio` - this restricted us from supporting calculated values which will be implemented in a later commit
This commit is contained in:
committed by
Tim Ledbetter
parent
9f8ffc3ad0
commit
f347be8206
Notes:
github-actions[bot]
2026-03-24 14:01:44 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/f347be82068 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8586 Reviewed-by: https://github.com/tcl3 ✅
@@ -2837,7 +2837,7 @@ RefPtr<StyleValue const> Parser::parse_nonnegative_integer_symbol_pair_value(Tok
|
||||
RefPtr<StyleValue const> Parser::parse_ratio_value(TokenStream<ComponentValue>& tokens)
|
||||
{
|
||||
if (auto ratio = parse_ratio(tokens); ratio.has_value())
|
||||
return RatioStyleValue::create(ratio.release_value());
|
||||
return RatioStyleValue::create(NumberStyleValue::create(ratio->numerator()), NumberStyleValue::create(ratio->denominator()));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user