mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use Option<RGBA> for color in shadow
This commit is contained in:
parent
f6a42ed9c1
commit
4e0b1071e7
5 changed files with 26 additions and 26 deletions
|
@ -1411,7 +1411,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
state.add_display_item(DisplayItem::BoxShadow(box BoxShadowDisplayItem {
|
||||
base: base,
|
||||
box_bounds: *absolute_bounds,
|
||||
color: style.resolve_color(box_shadow.base.color).to_gfx_color(),
|
||||
color: box_shadow.base.color.unwrap_or(style.get_color().color).to_gfx_color(),
|
||||
offset: Vector2D::new(box_shadow.base.horizontal, box_shadow.base.vertical),
|
||||
blur_radius: box_shadow.base.blur.0,
|
||||
spread_radius: box_shadow.spread,
|
||||
|
@ -2133,7 +2133,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
base: base.clone(),
|
||||
blur_radius: shadow.blur.0,
|
||||
offset: Vector2D::new(shadow.horizontal, shadow.vertical),
|
||||
color: self.style().resolve_color(shadow.color).to_gfx_color(),
|
||||
color: shadow.color.unwrap_or(self.style().get_color().color).to_gfx_color(),
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue