mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Implement XMLFragmentParser
Implement XMLFragmentParser based on the specification: https://html.spec.whatwg.org/multipage/xhtml.html Fixes one WPT in: domparsing/insert_adjacent_html-xhtml.xhtml
This commit is contained in:
parent
0b715b20a2
commit
5b2a71a712
Notes:
github-actions[bot]
2025-10-23 10:08:05 +00:00
Author: https://github.com/mikiubo
Commit: 5b2a71a712
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6157
Reviewed-by: https://github.com/AtkinsSJ ✅
7 changed files with 267 additions and 2 deletions
|
|
@ -92,6 +92,7 @@
|
|||
#include <LibWeb/WebIDL/AbstractOperations.h>
|
||||
#include <LibWeb/WebIDL/DOMException.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
#include <LibWeb/XML/XMLFragmentParser.h>
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
|
|
@ -2054,9 +2055,9 @@ WebIDL::ExceptionOr<GC::Ref<DOM::DocumentFragment>> Element::parse_fragment(Stri
|
|||
// 1. Let algorithm be the HTML fragment parsing algorithm.
|
||||
auto algorithm = HTML::HTMLParser::parse_html_fragment;
|
||||
|
||||
// FIXME: 2. If context's node document is an XML document, then set algorithm to the XML fragment parsing algorithm.
|
||||
// 2. If context's node document is an XML document, then set algorithm to the XML fragment parsing algorithm.
|
||||
if (document().is_xml_document()) {
|
||||
dbgln("FIXME: Handle fragment parsing of XML documents");
|
||||
algorithm = XMLFragmentParser::parse_xml_fragment;
|
||||
}
|
||||
|
||||
// 3. Let newChildren be the result of invoking algorithm given context and markup.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue