mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
parent
10c64820e8
commit
5b6a9110c7
3 changed files with 33 additions and 9 deletions
2
tests/wpt/meta/MANIFEST.json
vendored
2
tests/wpt/meta/MANIFEST.json
vendored
|
@ -567209,7 +567209,7 @@
|
|||
]
|
||||
],
|
||||
"white-space-intrinsic-size-021.html": [
|
||||
"a209f72c30a5a48ed4c185f9d3962abeb68399fb",
|
||||
"f9c246d4899b58dbcf2dc08655c8bc1f39995e5a",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
hr {
|
||||
clear: both;
|
||||
}
|
||||
x-br::before {
|
||||
content: "\a";
|
||||
white-space: preserve-breaks;
|
||||
}
|
||||
.collapse.wrap {
|
||||
white-space: normal;
|
||||
}
|
||||
|
@ -152,6 +156,16 @@ hr {
|
|||
<div class="break-spaces wrap" data-expected-client-width="20" data-expected-client-height="20">X É</div>
|
||||
<div class="break-spaces nowrap" data-expected-client-width="40" data-expected-client-height="10">X É</div>
|
||||
</div>
|
||||
<div class="container narrow">
|
||||
<div class="collapse wrap" data-expected-client-width="10" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="collapse nowrap" data-expected-client-width="10" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="preserve wrap" data-expected-client-width="10" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="preserve nowrap" data-expected-client-width="20" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="preserve-breaks wrap" data-expected-client-width="10" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="preserve-breaks nowrap" data-expected-client-width="10" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="break-spaces wrap" data-expected-client-width="20" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="break-spaces nowrap" data-expected-client-width="20" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
|
@ -255,6 +269,16 @@ hr {
|
|||
<div class="break-spaces wrap" data-expected-client-width="40" data-expected-client-height="10">X É</div>
|
||||
<div class="break-spaces nowrap" data-expected-client-width="40" data-expected-client-height="10">X É</div>
|
||||
</div>
|
||||
<div class="container wide">
|
||||
<div class="collapse wrap" data-expected-client-width="10" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="collapse nowrap" data-expected-client-width="10" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="preserve wrap" data-expected-client-width="20" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="preserve nowrap" data-expected-client-width="20" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="preserve-breaks wrap" data-expected-client-width="10" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="preserve-breaks nowrap" data-expected-client-width="10" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="break-spaces wrap" data-expected-client-width="20" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
<div class="break-spaces nowrap" data-expected-client-width="20" data-expected-client-height="20">X <x-br></x-br>É</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue