mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
fix block size for absolute replaced element
Absolutely replaced elements with padding were incorrectly setting their block size to include twice the padding values. This attempts to stop that extra padding for replaced elements but leave the working flow for non replaced elements
This commit is contained in:
parent
3ecd0174cc
commit
21e2ed522b
6 changed files with 112 additions and 1 deletions
|
@ -1300,7 +1300,12 @@ impl BlockFlow {
|
|||
self.base.position.start.b = solution.block_start + self.fragment.margin.block_start
|
||||
}
|
||||
|
||||
let block_size = solution.block_size + self.fragment.border_padding.block_start_end();
|
||||
let block_size = if self.fragment.is_replaced() {
|
||||
solution.block_size
|
||||
} else {
|
||||
(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