mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb/CSS: Handle calculated integers when expanding unresolved values
In order to know whether `calc(2.5)` is a number or an integer, we have to see what the property will accept. So, add that knowledge to `Parser::expand_unresolved_values()`. This makes `counter-increment: foo calc(2 * var(--n));` work correctly, in a test I'm working on.
This commit is contained in:
parent
aeed4921c4
commit
69d064697a
Notes:
github-actions[bot]
2024-10-16 06:35:11 +00:00
Author: https://github.com/AtkinsSJ
Commit: 69d064697a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1788
Reviewed-by: https://github.com/tcl3
2 changed files with 43 additions and 33 deletions
|
@ -158,11 +158,11 @@ public:
|
|||
return token;
|
||||
}
|
||||
|
||||
static Token create_number(double value)
|
||||
static Token create_number(double value, Number::Type number_type)
|
||||
{
|
||||
Token token;
|
||||
token.m_type = Type::Number;
|
||||
token.m_number_value = Number(Number::Type::Number, value);
|
||||
token.m_number_value = Number(number_type, value);
|
||||
return token;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue