mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Layout all math elements using InternalDummy context
Always create a new formatting context for <math> elements. Previously that didn't happen if they only had inline children, e.g. mtable. This fixes a crash in the WPT MathML test mathml/crashtests/children-with-negative-block-sizes.html
This commit is contained in:
parent
4408ea7c9b
commit
e7c209820d
Notes:
github-actions[bot]
2024-10-16 17:52:28 +00:00
Author: https://github.com/stendavid
Commit: e7c209820d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1831
3 changed files with 16 additions and 0 deletions
|
@ -136,6 +136,10 @@ Optional<FormattingContext::Type> FormattingContext::formatting_context_type_cre
|
|||
if (display.is_grid_inside())
|
||||
return Type::Grid;
|
||||
|
||||
if (display.is_math_inside())
|
||||
// HACK: Instead of crashing, create a dummy formatting context that does nothing.
|
||||
return Type::InternalDummy;
|
||||
|
||||
if (creates_block_formatting_context(box))
|
||||
return Type::Block;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue