mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibWeb: Remove CalculatedStyleValue from Length
This commit is contained in:
parent
62a8cf2bb8
commit
53a4a31af2
8 changed files with 25 additions and 70 deletions
|
@ -57,14 +57,13 @@ size_t GridFormattingContext::count_of_gap_rows()
|
|||
|
||||
CSSPixels GridFormattingContext::resolve_size(CSS::Size const& size, AvailableSize const& available_size, Box const& box)
|
||||
{
|
||||
if (size.is_length() && size.length().is_calculated()) {
|
||||
if (size.length().calculated_style_value()->contains_percentage()) {
|
||||
if (size.is_calculated()) {
|
||||
if (size.calculated().contains_percentage()) {
|
||||
if (!available_size.is_definite())
|
||||
return 0;
|
||||
auto& calc_value = *size.length().calculated_style_value();
|
||||
return calc_value.resolve_length_percentage(box, CSS::Length::make_px(available_size.to_px())).value_or(CSS::Length::make_auto()).to_px(box);
|
||||
return size.calculated().resolve_length_percentage(box, CSS::Length::make_px(available_size.to_px())).value_or(CSS::Length::make_auto()).to_px(box);
|
||||
}
|
||||
return size.length().to_px(box);
|
||||
return size.calculated().resolve_length(box)->to_px(box);
|
||||
}
|
||||
if (size.is_length()) {
|
||||
return size.length().to_px(box);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue