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