mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Fix incorrect sign background-image rectangle computation
This commit is contained in:
parent
1f6efbf9e9
commit
f53ac953d6
1 changed files with 3 additions and 1 deletions
|
@ -21,6 +21,7 @@ pub(super) struct BackgroundLayer {
|
||||||
pub repeat: bool,
|
pub repeat: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
struct Layout1DResult {
|
struct Layout1DResult {
|
||||||
repeat: bool,
|
repeat: bool,
|
||||||
bounds_origin: f32,
|
bounds_origin: f32,
|
||||||
|
@ -250,7 +251,8 @@ fn layout_1d(
|
||||||
let tile_stride = *tile_size + tile_spacing;
|
let tile_stride = *tile_size + tile_spacing;
|
||||||
let offset = position - painting_area_origin;
|
let offset = position - painting_area_origin;
|
||||||
let bounds_origin = position - tile_stride * (offset / tile_stride).ceil();
|
let bounds_origin = position - tile_stride * (offset / tile_stride).ceil();
|
||||||
let bounds_size = painting_area_size - bounds_origin - painting_area_origin;
|
let bounds_end = painting_area_origin + painting_area_size;
|
||||||
|
let bounds_size = bounds_end - bounds_origin;
|
||||||
Layout1DResult {
|
Layout1DResult {
|
||||||
repeat: true,
|
repeat: true,
|
||||||
bounds_origin,
|
bounds_origin,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue