mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Bug 1374233 - Part 13: Use NonNegative{*} types for components of Shadow and Filter.
MozReview-Commit-ID: Im4KGy1n9IJ
This commit is contained in:
parent
6dd8b159d7
commit
8651acd94c
13 changed files with 84 additions and 53 deletions
|
@ -1388,7 +1388,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
box_shadow.base.horizontal,
|
||||
box_shadow.base.vertical,
|
||||
)),
|
||||
box_shadow.base.blur,
|
||||
box_shadow.base.blur.0,
|
||||
box_shadow.spread,
|
||||
);
|
||||
|
||||
|
@ -1403,7 +1403,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
box_bounds: *absolute_bounds,
|
||||
color: style.resolve_color(box_shadow.base.color).to_gfx_color(),
|
||||
offset: Vector2D::new(box_shadow.base.horizontal, box_shadow.base.vertical),
|
||||
blur_radius: box_shadow.base.blur,
|
||||
blur_radius: box_shadow.base.blur.0,
|
||||
spread_radius: box_shadow.spread,
|
||||
border_radius: model::specified_border_radius(style.get_border()
|
||||
.border_top_left_radius,
|
||||
|
@ -2049,7 +2049,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
let effects = self.style().get_effects();
|
||||
let mut filters = effects.filter.0.clone();
|
||||
if effects.opacity != 1.0 {
|
||||
filters.push(Filter::Opacity(effects.opacity))
|
||||
filters.push(Filter::Opacity(effects.opacity.into()))
|
||||
}
|
||||
|
||||
let context_type = match mode {
|
||||
|
@ -2124,7 +2124,7 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
for shadow in text_shadows.iter().rev() {
|
||||
state.add_display_item(DisplayItem::PushTextShadow(box PushTextShadowDisplayItem {
|
||||
base: base.clone(),
|
||||
blur_radius: shadow.blur,
|
||||
blur_radius: shadow.blur.0,
|
||||
offset: Vector2D::new(shadow.horizontal, shadow.vertical),
|
||||
color: self.style().resolve_color(shadow.color).to_gfx_color(),
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue