mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Serialize clip-path and shape-outside using Servo.
Differential Revision: https://phabricator.services.mozilla.com/D3653
This commit is contained in:
parent
e96b025f10
commit
e338bd3add
2 changed files with 85 additions and 43 deletions
|
@ -81,3 +81,19 @@ impl ToAnimatedZero for BorderCornerRadius {
|
|||
Err(())
|
||||
}
|
||||
}
|
||||
|
||||
impl BorderRadius {
|
||||
/// Returns whether all the values are `0px`.
|
||||
pub fn all_zero(&self) -> bool {
|
||||
fn all(corner: &BorderCornerRadius) -> bool {
|
||||
fn is_zero(l: &LengthOrPercentage) -> bool {
|
||||
*l == LengthOrPercentage::zero()
|
||||
}
|
||||
is_zero(corner.0.width()) && is_zero(corner.0.height())
|
||||
}
|
||||
all(&self.top_left) &&
|
||||
all(&self.top_right) &&
|
||||
all(&self.bottom_left) &&
|
||||
all(&self.bottom_right)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue