зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #19699 - Correctly place images with background-position: center (from pyfisch:background-position-fix); r=emilio
Add a regression ref test. See also #19680. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 12a74de5a181c03852550d04632548011f8e7cb9 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 917c23a500ce0f8a31814a58d8f23be155c431cc
This commit is contained in:
Родитель
4b9832fad4
Коммит
6137e455a9
|
@ -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(
|
||||
|
|
Загрузка…
Ссылка в новой задаче