From d61d3ad4babc0410b8510bfcccbe8af2b10a1a8d Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Wed, 18 Mar 2015 11:08:53 +1000 Subject: [PATCH] Fixes positioning of inline blocks that generate stacking contexts. --- components/layout/inline.rs | 2 +- tests/ref/basic.list | 1 + .../ref/inline_block_stacking_context_a.html | 21 +++++++++++++++++++ .../inline_block_stacking_context_ref.html | 21 +++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 tests/ref/inline_block_stacking_context_a.html create mode 100644 tests/ref/inline_block_stacking_context_ref.html diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 97d88bb06b2..8a323d744f4 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -1342,7 +1342,7 @@ impl Flow for InlineFlow { self.base .absolute_position_info .relative_containing_block_mode, - CoordinateSystem::Own); + CoordinateSystem::Parent); let clip = fragment.clipping_region_for_children(&self.base.clip, &stacking_relative_border_box); match fragment.specific { diff --git a/tests/ref/basic.list b/tests/ref/basic.list index 0212f59dea9..ea43fdd0d20 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -133,6 +133,7 @@ flaky_cpu == append_style_a.html append_style_b.html == inline_block_parent_width.html inline_block_parent_width_ref.html == inline_block_parent_width_percentage.html inline_block_parent_width_ref.html == inline_block_percentage_height_a.html inline_block_percentage_height_ref.html +== inline_block_stacking_context_a.html inline_block_stacking_context_ref.html == inline_block_with_margin_a.html inline_block_with_margin_ref.html # inline_border_a.html inline_border_b.html == inline_element_border_a.html inline_element_border_ref.html diff --git a/tests/ref/inline_block_stacking_context_a.html b/tests/ref/inline_block_stacking_context_a.html new file mode 100644 index 00000000000..7580f853735 --- /dev/null +++ b/tests/ref/inline_block_stacking_context_a.html @@ -0,0 +1,21 @@ + + + + + + +
+
A
+
+ + diff --git a/tests/ref/inline_block_stacking_context_ref.html b/tests/ref/inline_block_stacking_context_ref.html new file mode 100644 index 00000000000..6f8c959212d --- /dev/null +++ b/tests/ref/inline_block_stacking_context_ref.html @@ -0,0 +1,21 @@ + + + + + + +
+
A
+
+ +