1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:07:43 +00:00

LibWeb: Resolve percentages in calc() for font-size

Fixes crashing on https://react.dev/
This commit is contained in:
Aliaksandr Kalenik 2023-10-04 16:24:24 +02:00 committed by Andreas Kling
parent b64ed060d8
commit 28c9015bd8
5 changed files with 39 additions and 18 deletions

View file

@ -95,6 +95,7 @@ public:
Optional<Length> resolve_length(Layout::Node const& layout_node) const;
Optional<Length> resolve_length_percentage(Layout::Node const&, Length const& percentage_basis) const;
Optional<Length> resolve_length_percentage(Layout::Node const&, CSSPixels percentage_basis) const;
Optional<Length> resolve_length_percentage(Length::ResolutionContext const&, Length const& percentage_basis) const;
bool resolves_to_percentage() const { return m_resolved_type.matches_percentage(); }
Optional<Percentage> resolve_percentage() const;