mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
||||
// margin because of erroneous block-size calculation in fragment.
|
||||
// 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(
|
||||
block_size_used_val,
|
||||
margin_block_start,
|
||||
|
@ -1300,11 +1300,7 @@ impl BlockFlow {
|
|||
self.base.position.start.b = solution.block_start + self.fragment.margin.block_start
|
||||
}
|
||||
|
||||
let block_size = if self.fragment.is_replaced() {
|
||||
solution.block_size
|
||||
} else {
|
||||
(solution.block_size + self.fragment.border_padding.block_start_end())
|
||||
};
|
||||
let block_size = solution.block_size + self.fragment.border_padding.block_start_end();
|
||||
|
||||
self.fragment.border_box.size.block = block_size;
|
||||
self.base.position.size.block = block_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue