1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 19:24:57 +00:00

LibHTML: Rename parse_html() => parse_html_document()

This commit is contained in:
Andreas Kling 2019-11-06 20:31:56 +01:00
parent 635717ed0f
commit f6439789db
7 changed files with 39 additions and 36 deletions

View file

@ -34,7 +34,7 @@ static bool is_self_closing_tag(const StringView& tag_name)
|| tag_name == "wbr";
}
static bool parse_html(const StringView& html, Document& document, ParentNode& root)
static bool parse_html_document(const StringView& html, Document& document, ParentNode& root)
{
NonnullRefPtrVector<ParentNode> node_stack;
node_stack.append(root);
@ -313,17 +313,17 @@ static bool parse_html(const StringView& html, Document& document, ParentNode& r
RefPtr<DocumentFragment> parse_html_fragment(Document& document, const StringView& html)
{
auto fragment = adopt(*new DocumentFragment(document));
if (!parse_html(html, document, *fragment))
if (!parse_html_document(html, document, *fragment))
return nullptr;
return fragment;
}
NonnullRefPtr<Document> parse_html(const StringView& html, const URL& url)
NonnullRefPtr<Document> parse_html_document(const StringView& html, const URL& url)
{
auto document = adopt(*new Document);
document->set_url(url);
bool success = parse_html(html, *document, *document);
bool success = parse_html_document(html, *document, *document);
ASSERT(success);
document->fixup();