mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:17:35 +00:00
LibWeb: Force paintable to exist for SVG <g> elements
This (along with the previous commit) fixes the missing tears on the sad Duolingo owl.
This commit is contained in:
parent
7d26383426
commit
40fa07a6e1
3 changed files with 8 additions and 3 deletions
|
@ -192,6 +192,11 @@ void SVGFormattingContext::run(Box const& box, LayoutMode layout_mode, Available
|
|||
auto const& svg_text_box = static_cast<SVGTextBox const&>(descendant);
|
||||
// NOTE: This hack creates a layout state to ensure the existence of a paintable box node in LayoutState::commit(), even when none of the values from UsedValues impact the SVG text.
|
||||
m_state.get_mutable(svg_text_box);
|
||||
} else if (is<SVGGraphicsBox>(descendant)) {
|
||||
// Same hack as above.
|
||||
// FIXME: This should be sized based on its children.
|
||||
auto const& svg_graphics_box = static_cast<SVGGraphicsBox const&>(descendant);
|
||||
m_state.get_mutable(svg_graphics_box);
|
||||
}
|
||||
|
||||
return IterationDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue