mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Unify background placement code
Merges the implementations for background-image placement from gradients and images. Add missing parts and fix bugs. Now supported are the CSS properties: * background-attachment (except for local value) * background-clip * background-origin * background-position-x/y * background-repeat * background-size It should be noted that backgrounds are not clipped to rounded border corners.
This commit is contained in:
parent
d96fb89c31
commit
3b3d4a9853
9 changed files with 306 additions and 344 deletions
|
@ -729,6 +729,7 @@ pub struct GradientDisplayItem {
|
|||
///
|
||||
/// Without tiles, the tile will be the same size as the background.
|
||||
pub tile: Size2D<Au>,
|
||||
pub tile_spacing: Size2D<Au>,
|
||||
}
|
||||
|
||||
/// Paints a radial gradient.
|
||||
|
@ -763,6 +764,7 @@ pub struct RadialGradientDisplayItem {
|
|||
///
|
||||
/// Without tiles, the tile will be the same size as the background.
|
||||
pub tile: Size2D<Au>,
|
||||
pub tile_spacing: Size2D<Au>,
|
||||
}
|
||||
|
||||
/// A normal border, supporting CSS border styles.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue