mirror of
https://github.com/servo/servo.git
synced 2025-07-16 03:43:38 +01:00
Correct negative margins in centered table cells
Fixes @AelitaBot queue viewer page
This commit is contained in:
parent
4aaae7a4e6
commit
c11f85947e
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