diff options
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r-- | components/layout/construct.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs index ba6407f6bc0..c14c6b61b74 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -2208,14 +2208,15 @@ fn has_padding_or_border(values: &ComputedValues) -> bool { let padding = values.get_padding(); let border = values.get_border(); + use style::Zero; !padding.padding_top.is_definitely_zero() || !padding.padding_right.is_definitely_zero() || !padding.padding_bottom.is_definitely_zero() || !padding.padding_left.is_definitely_zero() || - border.border_top_width.px() != 0. || - border.border_right_width.px() != 0. || - border.border_bottom_width.px() != 0. || - border.border_left_width.px() != 0. + !border.border_top_width.is_zero() || + !border.border_right_width.is_zero() || + !border.border_bottom_width.is_zero() || + !border.border_left_width.is_zero() } /// Maintains a stack of anonymous boxes needed to ensure that the flow tree is *legal*. The tree |