diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs index 55ee934bb7e..f2f1bafcf68 100644 --- a/components/layout/fragment.rs +++ b/components/layout/fragment.rs @@ -2023,15 +2023,17 @@ impl Fragment { overflow_x::T::visible, overflow_x::T::visible) | (position::T::fixed, + z_index::T::Auto, + overflow_x::T::visible, + overflow_x::T::visible) | + (position::T::relative, z_index::T::Auto, overflow_x::T::visible, overflow_x::T::visible) => false, (position::T::absolute, _, _, _) | - (position::T::fixed, _, _, _) => true, - (position::T::relative, _, _, _) | + (position::T::fixed, _, _, _) | + (position::T::relative, _, _, _) => true, (position::T::static_, _, _, _) => { - // FIXME(pcwalton): `position: relative` establishes a new stacking context if - // `z-index` is not `auto`. But this matches what we did before. false } } diff --git a/tests/ref/basic.list b/tests/ref/basic.list index 40c2e3bd3af..66e0f9a085e 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -291,6 +291,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html == position_relative_a.html position_relative_b.html == position_relative_inline_block_a.html position_relative_inline_block_ref.html == position_relative_painting_order_a.html position_relative_painting_order_ref.html +== position_relative_stacking_context_a.html position_relative_stacking_context_ref.html == position_relative_top_percentage_a.html position_relative_top_percentage_b.html == pre_ignorable_whitespace_a.html pre_ignorable_whitespace_ref.html == pre_with_tab.html pre_with_tab_ref.html diff --git a/tests/ref/position_relative_stacking_context_a.html b/tests/ref/position_relative_stacking_context_a.html new file mode 100644 index 00000000000..7bc60e116e1 --- /dev/null +++ b/tests/ref/position_relative_stacking_context_a.html @@ -0,0 +1,24 @@ + + +
+
+ diff --git a/tests/ref/position_relative_stacking_context_ref.html b/tests/ref/position_relative_stacking_context_ref.html new file mode 100644 index 00000000000..1bb24a009b4 --- /dev/null +++ b/tests/ref/position_relative_stacking_context_ref.html @@ -0,0 +1,16 @@ + + +
+ diff --git a/tests/wpt/metadata-css/css21_dev/html4/floats-041.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/min-height-106.htm.ini similarity index 61% rename from tests/wpt/metadata-css/css21_dev/html4/floats-041.htm.ini rename to tests/wpt/metadata-css/css21_dev/html4/min-height-106.htm.ini index cf50a585b2e..83bdbfdf497 100644 --- a/tests/wpt/metadata-css/css21_dev/html4/floats-041.htm.ini +++ b/tests/wpt/metadata-css/css21_dev/html4/min-height-106.htm.ini @@ -1,3 +1,3 @@ -[floats-041.htm] +[min-height-106.htm] type: reftest expected: FAIL diff --git a/tests/wpt/mozilla/tests/mozilla/canvas/drawimage_html_image_5_ref.html b/tests/wpt/mozilla/tests/mozilla/canvas/drawimage_html_image_5_ref.html index 66b7cc194ac..d8ec95525de 100644 --- a/tests/wpt/mozilla/tests/mozilla/canvas/drawimage_html_image_5_ref.html +++ b/tests/wpt/mozilla/tests/mozilla/canvas/drawimage_html_image_5_ref.html @@ -20,7 +20,6 @@ left: 50px; width: 64px; height: 32px; - overflow: hidden; } #destination .img img{