diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 2d031d4f922..20c5b0b44d2 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -1170,8 +1170,9 @@ impl<'a> PostorderNodeMutTraversal for FlowConstructor<'a> { // results of children. (display::T::none, _, _) => { for child in node.children() { - drop(child.swap_out_construction_result()) + child.set_flow_construction_result(ConstructionResult::None); } + node.set_flow_construction_result(ConstructionResult::None); } // Table items contribute table flow construction results. diff --git a/tests/ref/basic.list b/tests/ref/basic.list index 67dfebfdd6d..30296dc44a4 100644 --- a/tests/ref/basic.list +++ b/tests/ref/basic.list @@ -251,3 +251,4 @@ fragment=top != ../html/acid2.html acid2_ref.html == percentage_height_root.html percentage_height_root_ref.html == canvas_transform_a.html canvas_transform_ref.html != text_decoration_smoke_a.html text_decoration_smoke_ref.html +== hide_after_create.html hide_after_create_ref.html diff --git a/tests/ref/hide_after_create.html b/tests/ref/hide_after_create.html new file mode 100644 index 00000000000..e2fc4db41fb --- /dev/null +++ b/tests/ref/hide_after_create.html @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/tests/ref/hide_after_create_ref.html b/tests/ref/hide_after_create_ref.html new file mode 100644 index 00000000000..1c5cdc2bd21 --- /dev/null +++ b/tests/ref/hide_after_create_ref.html @@ -0,0 +1,10 @@ + + + + + +