Clear self.pending_whitespace.max_content in forced_line_break() (#33469)

If we encountered a preserved line break after some whitespace, we were
including the space in the max-content size of the following line.

So just like `line_break_opportunity()` was already clearing
`self.pending_whitespace.min_content`, `forced_line_break()` needs to
clear `self.pending_whitespace.max_content` too.

Also some cosmetic refactoring.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-09-16 12:57:56 +02:00 committed by GitHub
parent 10c64820e8
commit 5b6a9110c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33 additions and 9 deletions

View file

@ -567209,7 +567209,7 @@
]
],
"white-space-intrinsic-size-021.html": [
"a209f72c30a5a48ed4c185f9d3962abeb68399fb",
"f9c246d4899b58dbcf2dc08655c8bc1f39995e5a",
[
null,
{}