mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix computed value of outline width when outline style is not set.
This commit is contained in:
parent
ee22ae2635
commit
229dfbd117
3 changed files with 11 additions and 6 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[abspos-containing-block-001.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[abspos-containing-block-003.htm]
|
|
||||||
type: reftest
|
|
||||||
expected: FAIL
|
|
Loading…
Add table
Add a link
Reference in a new issue