mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
LibWeb: Add Canvas Context2D basic font property support
This commit is contained in:
parent
b05fe22d39
commit
bba14f6014
7 changed files with 181 additions and 27 deletions
|
@ -2293,6 +2293,8 @@ CSSPixels StyleComputer::parent_or_root_element_line_height(DOM::Element const*
|
|||
if (!parent_element)
|
||||
return m_root_element_font_metrics.line_height;
|
||||
auto const* computed_values = parent_element->computed_css_values();
|
||||
if (!computed_values)
|
||||
return m_root_element_font_metrics.line_height;
|
||||
auto parent_font_pixel_metrics = computed_values->computed_font().pixel_metrics();
|
||||
auto parent_font_size = computed_values->property(CSS::PropertyID::FontSize)->as_length().length();
|
||||
// FIXME: Can the parent font size be non-absolute here?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue