mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
move padding adjustments to inside is_replaced condition
This commit is contained in:
parent
e926bef796
commit
0eb8c06c7f
1 changed files with 2 additions and 6 deletions
|
@ -1259,7 +1259,7 @@ impl BlockFlow {
|
||||||
// TODO: Right now, this content block-size value includes the
|
// TODO: Right now, this content block-size value includes the
|
||||||
// margin because of erroneous block-size calculation in fragment.
|
// margin because of erroneous block-size calculation in fragment.
|
||||||
// Check this when that has been fixed.
|
// Check this when that has been fixed.
|
||||||
let block_size_used_val = self.fragment.border_box.size.block;
|
let block_size_used_val = self.fragment.border_box.size.block - self.fragment.border_padding.block_start_end();
|
||||||
solution = Some(BSizeConstraintSolution::solve_vertical_constraints_abs_replaced(
|
solution = Some(BSizeConstraintSolution::solve_vertical_constraints_abs_replaced(
|
||||||
block_size_used_val,
|
block_size_used_val,
|
||||||
margin_block_start,
|
margin_block_start,
|
||||||
|
@ -1300,11 +1300,7 @@ impl BlockFlow {
|
||||||
self.base.position.start.b = solution.block_start + self.fragment.margin.block_start
|
self.base.position.start.b = solution.block_start + self.fragment.margin.block_start
|
||||||
}
|
}
|
||||||
|
|
||||||
let block_size = if self.fragment.is_replaced() {
|
let block_size = solution.block_size + self.fragment.border_padding.block_start_end();
|
||||||
solution.block_size
|
|
||||||
} else {
|
|
||||||
(solution.block_size + self.fragment.border_padding.block_start_end())
|
|
||||||
};
|
|
||||||
|
|
||||||
self.fragment.border_box.size.block = block_size;
|
self.fragment.border_box.size.block = block_size;
|
||||||
self.base.position.size.block = block_size;
|
self.base.position.size.block = block_size;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue