Skip to main content

process_image_stretch_size

Function process_image_stretch_size 

Source
fn process_image_stretch_size(
    unsnapped_rect: &LayoutRect,
    repeat_size: LayoutSize,
) -> StretchSizeKey
Expand description

Image-specific stretch-size discriminator. Decided per-axis: if the gecko-specified repeat_size matches the unsnapped prim rect on that axis (within an FP-noise epsilon), the axis is flagged fills_* and the effective extent is resolved against the snapped prim rect at frame-build. Otherwise the explicit per-axis value is stored verbatim. Per-axis (rather than all-or-nothing) preserves the old process_repeat_size behaviour where a width-matching tile with a non-matching height still picks up the snapped prim width.