From 229dfbd117d3fb9b3cc6c15f72fa3d9f1c4b764c Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Wed, 17 Jun 2015 12:38:24 +1000 Subject: [PATCH] Fix computed value of outline width when outline style is not set. --- components/style/properties.mako.rs | 11 +++++++++++ .../html4/abspos-containing-block-001.htm.ini | 3 --- .../html4/abspos-containing-block-003.htm.ini | 3 --- 3 files changed, 11 insertions(+), 6 deletions(-) delete mode 100644 tests/wpt/metadata-css/css21_dev/html4/abspos-containing-block-001.htm.ini delete mode 100644 tests/wpt/metadata-css/css21_dev/html4/abspos-containing-block-003.htm.ini diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 3f66a733358..93b95a60e80 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -5732,6 +5732,12 @@ pub fn cascade(viewport_size: Size2D, 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 } diff --git a/tests/wpt/metadata-css/css21_dev/html4/abspos-containing-block-001.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/abspos-containing-block-001.htm.ini deleted file mode 100644 index 6a628438496..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/abspos-containing-block-001.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[abspos-containing-block-001.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata-css/css21_dev/html4/abspos-containing-block-003.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/abspos-containing-block-003.htm.ini deleted file mode 100644 index 53001ffedae..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/abspos-containing-block-003.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[abspos-containing-block-003.htm] - type: reftest - expected: FAIL