1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

LibWeb: Ignore font-size: calc(...) for now

This doesn't work correctly in the new world where fonts are resolved
during the CSS cascade. Let's patch it out with a FIXME and get back to
it once everything has fallen into place.
This commit is contained in:
Andreas Kling 2021-09-24 15:47:42 +02:00
parent f8dd3e14ba
commit 71f371f6b1

View file

@ -735,9 +735,12 @@ void StyleComputer::compute_font(StyleProperties& style, DOM::Element const* ele
maybe_length = length; maybe_length = length;
} }
if (maybe_length.has_value()) { if (maybe_length.has_value()) {
auto calculated_size = maybe_length.value().to_px(viewport_rect, font_metrics, root_font_size); // FIXME: Support font-size: calc(...)
if (calculated_size != 0) if (!maybe_length->is_calculated()) {
size = calculated_size; auto px = maybe_length.value().to_px(viewport_rect, font_metrics, root_font_size);
if (px != 0)
size = px;
}
} }
} }