mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Auto merge of #12293 - notriddle:margins_in_tables, r=mbrubeck
Correct negative margins in centered table cells Fixes the cell-filling links on @AelitaBot [queue viewer page](http://ec2-52-26-55-30.us-west-2.compute.amazonaws.com/). --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] Couldn't find an applicable issue, and by the time I reduced the test case I'd already found the bug - [X] There are tests for these changes <!-- 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/12293) <!-- Reviewable:end -->
This commit is contained in:
commit
7afe975281
4 changed files with 46 additions and 0 deletions
|
@ -80,8 +80,12 @@ impl TableCellFlow {
|
|||
if !flow::base(self).restyle_damage.contains(REFLOW) {
|
||||
return;
|
||||
}
|
||||
// Note to the reader: this code has been tested with negative margins.
|
||||
// We end up with a "end" that's before the "start," but the math still works out.
|
||||
let first_start = flow::base(self).children.front().map(|kid| {
|
||||
let kid_base = flow::base(kid);
|
||||
flow::base(kid).position.start.b
|
||||
- kid_base.collapsible_margins.block_start_margin_for_noncollapsible_context()
|
||||
});
|
||||
if let Some(mut first_start) = first_start {
|
||||
let mut last_end = first_start;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue