mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #18136 - upsuper:shadow-color, r=emilio
Use Option<RGBA> for color in shadow This fixes [bug 1390697](https://bugzilla.mozilla.org/show_bug.cgi?id=1390697) by downgrading the support of currentcolor in shadow to what Gecko currently supports. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18136) <!-- Reviewable:end -->
This commit is contained in:
commit
0b45a4f651
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