1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

LibWeb: Convert Layout Boxes to new pixel units

This commit is contained in:
Sam Atkins 2022-11-04 20:54:05 +00:00 committed by Linus Groh
parent c70dcaefcd
commit 65cdf89a8b
11 changed files with 29 additions and 28 deletions

View file

@ -66,7 +66,7 @@ void ImageBox::prepare_for_replaced_layout()
if (alt.is_empty())
alt = image_element.src();
float alt_text_width = 0;
CSSPixels alt_text_width = 0;
if (!m_cached_alt_text_width.has_value())
m_cached_alt_text_width = font.width(alt);
alt_text_width = m_cached_alt_text_width.value();