layout: Make percentages in top and bottom for relative positions

relative to height, not width.

Improves etsy.com.

Closes #13760.
This commit is contained in:
Patrick Walton 2016-10-13 22:50:27 -07:00
parent 0f4209644c
commit d5443ee450
14 changed files with 81 additions and 40 deletions

View file

@ -1379,10 +1379,10 @@ impl Fragment {
};
let offset_b = if offsets.block_start != LengthOrPercentageOrAuto::Auto {
MaybeAuto::from_style(offsets.block_start,
container_size.inline).specified_or_zero()
container_size.block).specified_or_zero()
} else {
-MaybeAuto::from_style(offsets.block_end,
container_size.inline).specified_or_zero()
container_size.block).specified_or_zero()
};
LogicalSize::new(style.writing_mode, offset_i, offset_b)
}