Compute overflow when viewport size changed
Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy --faster` does not report any errors
- [X] These changes fix#11120 (github issue number if applicable).
Either:
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11294)
<!-- Reviewable:end -->
It's a pointless abstraction that propagates the obsolete chan terminology,
swaps the order in which the sender and receiver are returned, and hides a
source of panics.
The whitespace range was not properly shifted which caused us to adjust the fragment's inline size by the advance of a different set of characters.
This was causing justified text lines to be too long or too short.
layout: Take margins in the inline direction into account when guessing the inline-size of block formatting contexts.
Fixes the layout on reddit.com.
Partially addresses #10571.
r? @mbrubeck
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11125)
<!-- Reviewable:end -->
Remove redundant code in whitespace stripping
LineBreaker calls Fragment::strip_trailing_whitespace_if_necessary and then recalculates the fragment's inline size. But this isn't necessary because strip_trailing_whitespace_if_necessary already recalculates the size.
r? @pcwalton
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11039)
<!-- Reviewable:end -->
LineBreaker calls Fragment::strip_trailing_whitespace_if_necessary and then
recalculates the fragment's inline size. But this isn't necessary because
strip_trailing_whitespace_if_necessary already recalculates the size.
Currently `compute_layout_damage` does the following for each child of the
node it's processing.
1. Update the child with damage from the parent.
2. Update the parent with damage from the child.
When these steps are repeated for the next child, the parent's damage may
include flags that came from its previous sibling(s). This means that damage
ends up propagating to later siblings, and not just between parents and
children as indended.
This patch propagates the same damage to all children, not including any
damage from their siblings.
This makes the line breaker determine the final block positions of each
line rather than doing it in a separate pass afterward. Not only does
this simplify the code, it makes `vertical-align` and float placement
interact properly.
These can't be supported in Servo as of right now, because I'm not
totally sure the accesses that should be done in layout would be
thread-safe.
It can be revisited later though.