mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibWeb: Don't assume table caption box wants to create a BFC
Instead, use the generic create_independent_formatting_context_if_needed so that unusual situations like image-as-table-caption don't crash. This logic clearly needs more work, but let's at least do better than crashing. This gives us 26 new subtest passes on WPT.
This commit is contained in:
parent
f7a7cd9b2b
commit
fbb3b06462
Notes:
github-actions[bot]
2025-04-24 16:28:10 +00:00
Author: https://github.com/awesomekling
Commit: fbb3b06462
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4455
Reviewed-by: https://github.com/AtkinsSJ ✅
6 changed files with 477 additions and 9 deletions
|
@ -176,7 +176,7 @@ Optional<FormattingContext::Type> FormattingContext::formatting_context_type_cre
|
|||
// FIXME: This is a hack. Get rid of it.
|
||||
struct ReplacedFormattingContext : public FormattingContext {
|
||||
ReplacedFormattingContext(LayoutState& state, LayoutMode layout_mode, Box const& box)
|
||||
: FormattingContext(Type::Block, layout_mode, state, box)
|
||||
: FormattingContext(Type::InternalReplaced, layout_mode, state, box)
|
||||
{
|
||||
}
|
||||
virtual CSSPixels automatic_content_width() const override { return 0; }
|
||||
|
@ -187,7 +187,7 @@ struct ReplacedFormattingContext : public FormattingContext {
|
|||
// FIXME: This is a hack. Get rid of it.
|
||||
struct DummyFormattingContext : public FormattingContext {
|
||||
DummyFormattingContext(LayoutState& state, LayoutMode layout_mode, Box const& box)
|
||||
: FormattingContext(Type::Block, layout_mode, state, box)
|
||||
: FormattingContext(Type::InternalDummy, layout_mode, state, box)
|
||||
{
|
||||
}
|
||||
virtual CSSPixels automatic_content_width() const override { return 0; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue