mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +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:
parent
be3e221b3f
commit
bc0729f5d2
Notes:
github-actions[bot]
2025-02-16 19:41:11 +00:00
Author: https://github.com/Gingeh Commit: https://github.com/LadybirdBrowser/ladybird/commit/bc0729f5d26 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3537 Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 5 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue