mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement radial gradients for borders.
The property border-image-outset is not yet implemented. Note: Also support repeating-linear-gradients for borders.
This commit is contained in:
parent
a956e3fd52
commit
b230be8aaf
3 changed files with 50 additions and 3 deletions
|
@ -1334,8 +1334,24 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
}),
|
||||
}));
|
||||
}
|
||||
GradientKind::Radial(_, _) => {
|
||||
// TODO(#16638): Handle border-image with radial gradient.
|
||||
GradientKind::Radial(ref shape, ref center) => {
|
||||
let grad = self.convert_radial_gradient(&bounds,
|
||||
&gradient.items[..],
|
||||
shape,
|
||||
center,
|
||||
gradient.repeating,
|
||||
style);
|
||||
state.add_display_item(DisplayItem::Border(box BorderDisplayItem {
|
||||
base: base,
|
||||
border_widths: border.to_physical(style.writing_mode),
|
||||
details: BorderDetails::RadialGradient(
|
||||
display_list::RadialGradientBorder {
|
||||
gradient: grad,
|
||||
|
||||
// TODO(gw): Support border-image-outset
|
||||
outset: SideOffsets2D::zero(),
|
||||
}),
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue