mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:27:45 +00:00
LibWeb: Mark content: "string"
text nodes as generated
This will allow us to give them special treatment, particularly when they are an empty string.
This commit is contained in:
parent
063d6cab8b
commit
4ddfc3a6db
1 changed files with 1 additions and 0 deletions
|
@ -167,6 +167,7 @@ void TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element, CSS::Se
|
||||||
if (pseudo_element_content.type == CSS::ContentData::Type::String) {
|
if (pseudo_element_content.type == CSS::ContentData::Type::String) {
|
||||||
auto* text = document.heap().allocate<DOM::Text>(document.realm(), document, pseudo_element_content.data);
|
auto* text = document.heap().allocate<DOM::Text>(document.realm(), document, pseudo_element_content.data);
|
||||||
auto text_node = adopt_ref(*new TextNode(document, *text));
|
auto text_node = adopt_ref(*new TextNode(document, *text));
|
||||||
|
text_node->set_generated(true);
|
||||||
push_parent(verify_cast<NodeWithStyle>(*pseudo_element_node));
|
push_parent(verify_cast<NodeWithStyle>(*pseudo_element_node));
|
||||||
insert_node_into_inline_or_block_ancestor(text_node, text_node->display(), AppendOrPrepend::Append);
|
insert_node_into_inline_or_block_ancestor(text_node, text_node->display(), AppendOrPrepend::Append);
|
||||||
pop_parent();
|
pop_parent();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue