mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Move XMLSerializer into HTML directory
The DOMParsing spec is in the process of being merged into the HTML one,
gradually. The linked spec change moves XMLSerializer, but many of the
algorithms are still in the DOMParsing spec so I've left the links to
those alone.
I've done my best to update the GN build but since I'm not actually
using it, I might have done that wrong.
Corresponds to 2edb8cc7ee
This commit is contained in:
parent
a11848f163
commit
f148af0a93
Notes:
github-actions[bot]
2025-03-04 16:45:51 +00:00
Author: https://github.com/AtkinsSJ
Commit: f148af0a93
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3779
Reviewed-by: https://github.com/tcl3 ✅
18 changed files with 25 additions and 32 deletions
|
@ -1815,7 +1815,7 @@ void Node::string_replace_all(String const& string)
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#fragment-serializing-algorithm-steps
|
||||
WebIDL::ExceptionOr<String> Node::serialize_fragment(DOMParsing::RequireWellFormed require_well_formed, FragmentSerializationMode fragment_serialization_mode) const
|
||||
WebIDL::ExceptionOr<String> Node::serialize_fragment(HTML::RequireWellFormed require_well_formed, FragmentSerializationMode fragment_serialization_mode) const
|
||||
{
|
||||
// 1. Let context document be the value of node's node document.
|
||||
auto const& context_document = document();
|
||||
|
@ -1830,12 +1830,12 @@ WebIDL::ExceptionOr<String> Node::serialize_fragment(DOMParsing::RequireWellForm
|
|||
if (fragment_serialization_mode == FragmentSerializationMode::Inner) {
|
||||
StringBuilder markup;
|
||||
for (auto* child = first_child(); child; child = child->next_sibling()) {
|
||||
auto child_markup = TRY(DOMParsing::serialize_node_to_xml_string(*child, require_well_formed));
|
||||
auto child_markup = TRY(HTML::serialize_node_to_xml_string(*child, require_well_formed));
|
||||
markup.append(child_markup.bytes_as_string_view());
|
||||
}
|
||||
return MUST(markup.to_string());
|
||||
}
|
||||
return DOMParsing::serialize_node_to_xml_string(*this, require_well_formed);
|
||||
return HTML::serialize_node_to_xml_string(*this, require_well_formed);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#unsafely-set-html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue