diff options
author | Andreas Kling <kling@serenityos.org> | 2022-10-06 21:00:16 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-10-06 21:08:50 +0200 |
commit | 71f7bb619dcb4b47c307fde9692d1a79bb6a418f (patch) | |
tree | 006c764906708b77ce13cfe8d1b51889ef105b16 /Userland/Libraries | |
parent | d3069bceeb5a1d0b807691102e2d1f071af3e69d (diff) | |
download | serenity-71f7bb619dcb4b47c307fde9692d1a79bb6a418f.zip |
LibWeb: Use text node's own display value when inserting CSS `content`
This ensures that the pseudo element wrapper is transformed into a block
container with inline children if needed.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp index f588bd6f00..937ea030de 100644 --- a/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp +++ b/Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp @@ -166,7 +166,7 @@ void TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element, CSS::Se auto* text = document.heap().allocate<DOM::Text>(document.realm(), document, pseudo_element_content.data); auto text_node = adopt_ref(*new TextNode(document, *text)); push_parent(verify_cast<NodeWithStyle>(*pseudo_element_node)); - insert_node_into_inline_or_block_ancestor(text_node, pseudo_element_display, AppendOrPrepend::Append); + insert_node_into_inline_or_block_ancestor(text_node, text_node->display(), AppendOrPrepend::Append); pop_parent(); } else { TODO(); |