Correctly place images with background-position: center

Add a regression ref test.
See also #19680.
This commit is contained in:
Pyfisch 2018-01-05 10:45:26 +01:00
parent 3692f13dcb
commit 859f002bf2
4 changed files with 60 additions and 1 deletions

View file

@ -1581,7 +1581,7 @@ impl FragmentDisplayListBuilding for Fragment {
let mut tile_size = compute_background_image_size(bg_size, bounds.size, intrinsic_size);
let mut tile_spacing = Size2D::zero();
let own_position = bounds.size - intrinsic_size.unwrap_or(Size2D::zero());
let own_position = bounds.size - tile_size;
let pos_x = bg_position_x.to_used_value(own_position.width);
let pos_y = bg_position_y.to_used_value(own_position.height);
tile_image_axis(