Skip to content

Commit

Permalink
Update WR (inset box shadow fix, border-image support).
Browse files Browse the repository at this point in the history
I have a follow up PR for Servo that uses the new border-image
APIs, but I'll land that separately, so that we don't delay
landing the WR update itself.
  • Loading branch information
gw3583 committed Feb 22, 2017
1 parent 03893e2 commit c4a972a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 34 deletions.
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 15 additions & 9 deletions components/layout/webrender_helpers.rs
Expand Up @@ -270,35 +270,41 @@ impl WebRenderDisplayItemConverter for DisplayItem {
}
DisplayItem::Border(ref item) => {
let rect = item.base.bounds.to_rectf();
let widths = webrender_traits::BorderWidths {
left: item.border_widths.left.to_f32_px(),
top: item.border_widths.top.to_f32_px(),
right: item.border_widths.right.to_f32_px(),
bottom: item.border_widths.bottom.to_f32_px(),
};
let left = webrender_traits::BorderSide {
width: item.border_widths.left.to_f32_px(),
color: item.color.left,
style: item.style.left.to_border_style(),
};
let top = webrender_traits::BorderSide {
width: item.border_widths.top.to_f32_px(),
color: item.color.top,
style: item.style.top.to_border_style(),
};
let right = webrender_traits::BorderSide {
width: item.border_widths.right.to_f32_px(),
color: item.color.right,
style: item.style.right.to_border_style(),
};
let bottom = webrender_traits::BorderSide {
width: item.border_widths.bottom.to_f32_px(),
color: item.color.bottom,
style: item.style.bottom.to_border_style(),
};
let radius = item.radius.to_border_radius();
let clip = item.base.clip.to_clip_region(builder);
let details = webrender_traits::NormalBorder {
left: left,
top: top,
right: right,
bottom: bottom,
radius: radius,
};
builder.push_border(rect,
clip,
left,
top,
right,
bottom,
radius);
widths,
webrender_traits::BorderDetails::Normal(details));
}
DisplayItem::Gradient(ref item) => {
let rect = item.base.bounds.to_rectf();
Expand Down

0 comments on commit c4a972a

Please sign in to comment.