mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +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
37
Libraries/LibWeb/HTML/XMLSerializer.h
Normal file
37
Libraries/LibWeb/HTML/XMLSerializer.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#xmlserializer
|
||||
class XMLSerializer final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(XMLSerializer, Bindings::PlatformObject);
|
||||
GC_DECLARE_ALLOCATOR(XMLSerializer);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<GC::Ref<XMLSerializer>> construct_impl(JS::Realm&);
|
||||
|
||||
virtual ~XMLSerializer() override;
|
||||
|
||||
WebIDL::ExceptionOr<String> serialize_to_string(GC::Ref<DOM::Node const> root);
|
||||
|
||||
private:
|
||||
explicit XMLSerializer(JS::Realm&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
enum class RequireWellFormed {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
|
||||
WebIDL::ExceptionOr<String> serialize_node_to_xml_string(GC::Ref<DOM::Node const> root, RequireWellFormed require_well_formed);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue