mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Correctly place images with background-position: center
Add a regression ref test. See also #19680.
This commit is contained in:
parent
3692f13dcb
commit
859f002bf2
4 changed files with 60 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue