mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +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
Notes:
sideshowbarker
2024-07-17 06:20:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/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) {
|
||||
auto* text = document.heap().allocate<DOM::Text>(document.realm(), document, pseudo_element_content.data);
|
||||
auto text_node = adopt_ref(*new TextNode(document, *text));
|
||||
text_node->set_generated(true);
|
||||
push_parent(verify_cast<NodeWithStyle>(*pseudo_element_node));
|
||||
insert_node_into_inline_or_block_ancestor(text_node, text_node->display(), AppendOrPrepend::Append);
|
||||
pop_parent();
|
||||
|
|
Loading…
Reference in a new issue