mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibWeb: Handle calculations without a context better
This commit is contained in:
parent
c0beacbb76
commit
4408ea7c9b
Notes:
github-actions[bot]
2024-10-16 14:40:42 +00:00
Author: https://github.com/stelar7
Commit: 4408ea7c9b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1827
4 changed files with 41 additions and 3 deletions
|
@ -178,11 +178,14 @@ public:
|
|||
{
|
||||
if (is_auto())
|
||||
return 0;
|
||||
if (is_absolute())
|
||||
return absolute_length_to_px();
|
||||
if (is_font_relative())
|
||||
return font_relative_length_to_px(font_metrics, root_font_metrics);
|
||||
if (is_viewport_relative())
|
||||
return viewport_relative_length_to_px(viewport_rect);
|
||||
return absolute_length_to_px();
|
||||
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
ALWAYS_INLINE CSSPixels absolute_length_to_px() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue