From 4a5802bff8c24cd7f3dcdbe2d155d5f3780c0983 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 8 May 2014 18:21:52 +0100 Subject: [PATCH] This should not make any difference AFAICT, but seems to fix some layout bugs. --- src/components/style/properties.rs.mako | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/style/properties.rs.mako b/src/components/style/properties.rs.mako index 40cd74a5b48..62cce5f1ef4 100644 --- a/src/components/style/properties.rs.mako +++ b/src/components/style/properties.rs.mako @@ -1887,16 +1887,18 @@ pub fn cascade(applicable_declarations: &[MatchedProperty], } } + // The initial value of border-*-width may be changed at computed value time. { let border = style_Border.get_mut(); % for side in ["top", "right", "bottom", "left"]: // Like calling to_computed_value, which wouldn't type check. - if !(seen.get_border_${side}_width() || context.border_${side}_present) { + if !context.border_${side}_present { border.border_${side}_width = Au(0); } % endfor } + // The initial value of display may be changed at computed value time. if !seen.get_display() { let box_ = style_Box.get_mut(); box_.display = longhands::display::to_computed_value(box_.display, &context);