Auto merge of #6403 - glennw:fix-outline-width, r=SimonSapin

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



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6403)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-06-17 20:29:44 -06:00
commit fd44db2190
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); 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 { if is_root_element {
context.root_font_size = context.font_size; 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); border.border_${side}_width = Au(0);
% endfor % 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. // None of the teaks on 'display' apply here.
result result
} }

View file

@ -1,3 +0,0 @@
[abspos-containing-block-001.htm]
type: reftest
expected: FAIL

View file

@ -1,3 +0,0 @@
[abspos-containing-block-003.htm]
type: reftest
expected: FAIL