Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix block size for absolute replaced element #19184

Merged
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

move padding adjustments to inside is_replaced condition

  • Loading branch information
bobthekingofegypt committed Nov 22, 2017
commit 0eb8c06c7fe4ea45b2dbfeb773b6760a0ae94778
@@ -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;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.