Auto merge of #16800 - Manishearth:border-radius, r=emilio

Allow border radii to be set via preshints

Fixes rendering of `<hr>`

<!-- 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/16800)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-05-10 19:05:21 -05:00 committed by GitHub
commit 6de4c93aaf
2 changed files with 15 additions and 10 deletions

View file

@ -26,6 +26,12 @@ impl<L> HasViewportPercentage for BorderRadiusSize<L> {
fn has_viewport_percentage(&self) -> bool { false }
}
impl<L: Clone> From<L> for BorderRadiusSize<L> {
fn from(other: L) -> Self {
Self::new(other.clone(), other)
}
}
impl<L> BorderRadiusSize<L> {
#[inline]
/// Create a new `BorderRadiusSize` for an area of given width and height.