This should not make any difference AFAICT, but seems to fix some layout bugs.

This commit is contained in:
Simon Sapin 2014-05-08 18:21:52 +01:00
parent 2afe048863
commit 4a5802bff8

View file

@ -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(); let border = style_Border.get_mut();
% for side in ["top", "right", "bottom", "left"]: % for side in ["top", "right", "bottom", "left"]:
// Like calling to_computed_value, which wouldn't type check. // 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); border.border_${side}_width = Au(0);
} }
% endfor % endfor
} }
// The initial value of display may be changed at computed value time.
if !seen.get_display() { if !seen.get_display() {
let box_ = style_Box.get_mut(); let box_ = style_Box.get_mut();
box_.display = longhands::display::to_computed_value(box_.display, &context); box_.display = longhands::display::to_computed_value(box_.display, &context);