mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Create a BlockContainer for 'block ruby' elements
Prevents the layout engine from crashing. (and unlocks ~200 new subtests)
This commit is contained in:
@@ -461,6 +461,11 @@ GC::Ptr<Layout::NodeWithStyle> Element::create_layout_node_for_display_type(DOM:
|
||||
return document.heap().allocate<Layout::BlockContainer>(document, element, move(style));
|
||||
|
||||
dbgln("FIXME: CSS display '{}' not implemented yet.", display.to_string());
|
||||
|
||||
// FIXME: We don't actually support `display: block ruby`, this is just a hack to prevent a crash
|
||||
if (display.is_ruby_inside())
|
||||
return document.heap().allocate<Layout::BlockContainer>(document, element, move(style));
|
||||
|
||||
return document.heap().allocate<Layout::InlineNode>(document, element, move(style));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user