mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
LibWeb: Add debug log message for missing calc() context
This commit is contained in:
parent
488436fb54
commit
2b65e86ec7
Notes:
github-actions[bot]
2024-10-29 14:41:42 +00:00
Author: https://github.com/stelar7
Commit: 2b65e86ec7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1823
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 3 additions and 1 deletions
|
@ -52,8 +52,10 @@ static double resolve_value(CSSMathValue::CalculationResult::Value value, Option
|
||||||
return length.absolute_length_to_px().to_double();
|
return length.absolute_length_to_px().to_double();
|
||||||
|
|
||||||
// If we dont have a context, we cant resolve the length, so return NAN
|
// If we dont have a context, we cant resolve the length, so return NAN
|
||||||
if (!context.has_value())
|
if (!context.has_value()) {
|
||||||
|
dbgln("Failed to resolve length, likely due to calc() being used with relative units and a property not taking it into account");
|
||||||
return Number(Number::Type::Number, NAN).value();
|
return Number(Number::Type::Number, NAN).value();
|
||||||
|
}
|
||||||
|
|
||||||
return length.to_px(*context).to_double();
|
return length.to_px(*context).to_double();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue