mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibWeb: Make CSS sign(A) behave correctly for negative zero
We were incorrectly returning 0 instead of -0 for sign(-0). +7 new WPT subtest passes.
This commit is contained in:
parent
c1e79d0b13
commit
4ef34ebd96
Notes:
github-actions[bot]
2025-05-20 11:29:42 +00:00
Author: https://github.com/awesomekling
Commit: 4ef34ebd96
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4823
2 changed files with 10 additions and 10 deletions
|
@ -1400,7 +1400,7 @@ Optional<CalculatedStyleValue::CalculationResult> SignCalculationNode::run_opera
|
|||
sign = 1;
|
||||
} else {
|
||||
FloatExtractor<double> const extractor { .d = child_value->value() };
|
||||
sign = extractor.sign ? -0 : 0;
|
||||
sign = extractor.sign ? -0.0 : 0.0;
|
||||
}
|
||||
|
||||
return CalculatedStyleValue::CalculationResult { sign, CSSNumericType {}.made_consistent_with(child_value->type().value()) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue