mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibWeb: Calculate calc() lengths in to_px()
to_px() has the layout node available, so let's use it.
This commit is contained in:
parent
67066c5140
commit
6df3f9920d
2 changed files with 5 additions and 0 deletions
|
@ -86,6 +86,8 @@ public:
|
|||
return 0;
|
||||
if (is_relative())
|
||||
return relative_length_to_px(viewport_rect, font_metrics, root_font_size);
|
||||
if (is_calculated())
|
||||
VERIFY_NOT_REACHED(); // We can't resolve a calculated length from here. :^(
|
||||
return absolute_length_to_px();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue