style: Use rust lengths for border corners.

The test in https://github.com/web-platform-tests/wpt/pull/15423 hasn't been
synced over yet, but it passes with this patch of course.

Differential Revision: https://phabricator.services.mozilla.com/D20960
This commit is contained in:
Emilio Cobos Álvarez 2019-02-24 10:47:53 -08:00
parent aad4dac5b4
commit 197065f6bc
7 changed files with 51 additions and 174 deletions

View file

@ -87,6 +87,16 @@ impl BorderCornerRadius {
}
impl BorderRadius {
/// Returns a `0` border radius.
pub fn zero() -> Self {
Self {
top_left: BorderCornerRadius::zero(),
top_right: BorderCornerRadius::zero(),
bottom_right: BorderCornerRadius::zero(),
bottom_left: BorderCornerRadius::zero(),
}
}
/// Returns whether all the values are `0px`.
pub fn all_zero(&self) -> bool {
fn all(corner: &BorderCornerRadius) -> bool {