Files
tubestation/testing/web-platform/tests/css/css-text
Jonathan Kew fc0cc6db34 Bug 1941797 - :before/:after pseudos with display:block should not affect text-wrap balancing of the inline content of a block. r=layout-reviewers,dshin,emilio
The patch landed in bug 1858421 aimed to avoid exponentially-bad behavior with
text-wrap:balance applied to nested blocks by just disabling balancing for any
block where the list of lines includes any block lines (as opposed to the typical
inline lines we get for actual text content).

But if we have :before or :after pseudos with display:block, they'll generate
such block lines (even if their content is empty), thereby preventing balance
being applied to the block at all.

Rather than completely disabling balance if there's a block line, we can avoid
the bad behavior if we simply avoid descending into block lines during the
multiple "trial reflows" that we perform to find the desired balance width.
Those blocks will be reflowed in their own right during the first trial reflow,
and after that we don't need to reflow them again during subsequent trials as
their width is independent of the balancing being done to the inline content.

Differential Revision: https://phabricator.services.mozilla.com/D234501
2025-01-16 15:14:28 +00:00
..