mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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:
parent
aad4dac5b4
commit
197065f6bc
7 changed files with 51 additions and 174 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue