mirror of
https://github.com/servo/servo.git
synced 2025-06-15 11:54:28 +00: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
|
@ -442,7 +442,7 @@ impl WebRenderDisplayItemConverter for DisplayItem {
|
|||
builder.push_gradient(&self.prim_info(),
|
||||
gradient,
|
||||
item.tile.to_sizef(),
|
||||
webrender_api::LayoutSize::zero());
|
||||
item.tile_spacing.to_sizef());
|
||||
}
|
||||
DisplayItem::RadialGradient(ref item) => {
|
||||
let center = item.gradient.center.to_pointf();
|
||||
|
@ -459,7 +459,7 @@ impl WebRenderDisplayItemConverter for DisplayItem {
|
|||
builder.push_radial_gradient(&self.prim_info(),
|
||||
gradient,
|
||||
item.tile.to_sizef(),
|
||||
webrender_api::LayoutSize::zero());
|
||||
item.tile_spacing.to_sizef());
|
||||
}
|
||||
DisplayItem::Line(ref item) => {
|
||||
builder.push_line(&self.prim_info(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue