Fix computed value of outline width when outline style is not set.

This commit is contained in:
Glenn Watson 2015-06-17 12:38:24 +10:00
parent ee22ae2635
commit 229dfbd117
3 changed files with 11 additions and 6 deletions

View file

@ -5732,6 +5732,12 @@ pub fn cascade(viewport_size: Size2D<Au>,
box_.display = box_.display.to_computed_value(&context);
}
// The initial value of outline width may be changed at computed value time.
if !context.outline_style_present {
let outline = unsafe { style_outline.make_unique() };
outline.outline_width = Au(0);
}
if is_root_element {
context.root_font_size = context.font_size;
}
@ -5779,6 +5785,11 @@ pub fn cascade_anonymous(parent_style: &ComputedValues) -> ComputedValues {
border.border_${side}_width = Au(0);
% endfor
}
{
// Initial value of outline-style is always none for anonymous box.
let outline = unsafe { result.outline.make_unique() };
outline.outline_width = Au(0);
}
// None of the teaks on 'display' apply here.
result
}