mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 08:11:13 +00:00
LibWeb: Don't create dummy formating context for internal table boxes
Internal table boxes are managed by TFC and do not need a dummy FC. We still need to keep dummy FC for <math> though.
This commit is contained in:
parent
20f18d6ec2
commit
d17f94e7cc
Notes:
github-actions[bot]
2024-09-14 13:05:03 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/d17f94e7cc0 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1396
|
@ -142,14 +142,17 @@ Optional<FormattingContext::Type> FormattingContext::formatting_context_type_cre
|
|||
if (box.children_are_inline())
|
||||
return {};
|
||||
|
||||
if (display.is_table_column() || display.is_table_row_group() || display.is_table_header_group() || display.is_table_footer_group() || display.is_table_row() || display.is_table_column_group())
|
||||
return {};
|
||||
|
||||
// The box is a block container that doesn't create its own BFC.
|
||||
// It will be formatted by the containing BFC.
|
||||
if (!display.is_flow_inside()) {
|
||||
// HACK: Instead of crashing, create a dummy formatting context that does nothing.
|
||||
// FIXME: Remove this once it's no longer needed. It currently swallows problem with standalone
|
||||
// table-related boxes that don't get fixed up by CSS anonymous table box generation.
|
||||
// FIXME: We need this for <math> elements
|
||||
return Type::InternalDummy;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue