mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-17 05:29:56 +00:00
LibWeb/CSS: Migrate some call sites to non-deprecated resolve_* methods
This ensures that we clamp values for properties like padding-* to valid ranges (non-negative in this case) if they are specified with `calc()`. The length-related changes in this commit combined with the ones from the previous commit fix the primary layout issue on https://lwn.net (yes, not the first place I would have expected problems either).
This commit is contained in:
parent
7afcf305b2
commit
b057bad102
Notes:
github-actions[bot]
2025-09-07 14:56:24 +00:00
Author: https://github.com/InvalidUsernameException
Commit: b057bad102
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6083
Reviewed-by: https://github.com/AtkinsSJ ✅
7 changed files with 55 additions and 34 deletions
|
@ -79,12 +79,11 @@ Optional<Frequency::Type> Frequency::unit_from_name(StringView name)
|
|||
|
||||
Frequency Frequency::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, Layout::Node const& layout_node, Frequency const& reference_value)
|
||||
{
|
||||
return calculated->resolve_frequency_deprecated(
|
||||
{
|
||||
.percentage_basis = reference_value,
|
||||
.length_resolution_context = Length::ResolutionContext::for_layout_node(layout_node),
|
||||
})
|
||||
.value();
|
||||
CalculationResolutionContext context {
|
||||
.percentage_basis = reference_value,
|
||||
.length_resolution_context = Length::ResolutionContext::for_layout_node(layout_node),
|
||||
};
|
||||
return calculated->resolve_frequency(context).value();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue