If you call LayoutPseudoNode::new here, then you don't need the pseudo_parent_element variable. pseudo_parent_abstract_node can just use the LayoutPseudoNode's node field instead of AbstractNode::from_layout_pseudo.