mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
Revert "LibHTML: Rename parse_html() => parse_html_document()"
This reverts commit f6439789db
.
Oops, I committed unrelated changes here, let me clean that up..
This commit is contained in:
parent
f6439789db
commit
f5cf8d4ad8
7 changed files with 38 additions and 41 deletions
|
@ -314,7 +314,7 @@ void HtmlView::load(const URL& url)
|
|||
if (url.path().ends_with(".png")) {
|
||||
document = create_image_document(data, url);
|
||||
} else {
|
||||
document = parse_html_document(data, url);
|
||||
document = parse_html(data, url);
|
||||
}
|
||||
ASSERT(document);
|
||||
set_document(document);
|
||||
|
|
|
@ -34,7 +34,7 @@ static bool is_self_closing_tag(const StringView& tag_name)
|
|||
|| tag_name == "wbr";
|
||||
}
|
||||
|
||||
static bool parse_html_document(const StringView& html, Document& document, ParentNode& root)
|
||||
static bool parse_html(const StringView& html, Document& document, ParentNode& root)
|
||||
{
|
||||
NonnullRefPtrVector<ParentNode> node_stack;
|
||||
node_stack.append(root);
|
||||
|
@ -313,17 +313,17 @@ static bool parse_html_document(const StringView& html, Document& document, Pare
|
|||
RefPtr<DocumentFragment> parse_html_fragment(Document& document, const StringView& html)
|
||||
{
|
||||
auto fragment = adopt(*new DocumentFragment(document));
|
||||
if (!parse_html_document(html, document, *fragment))
|
||||
if (!parse_html(html, document, *fragment))
|
||||
return nullptr;
|
||||
return fragment;
|
||||
}
|
||||
|
||||
NonnullRefPtr<Document> parse_html_document(const StringView& html, const URL& url)
|
||||
NonnullRefPtr<Document> parse_html(const StringView& html, const URL& url)
|
||||
{
|
||||
auto document = adopt(*new Document);
|
||||
document->set_url(url);
|
||||
|
||||
bool success = parse_html_document(html, *document, *document);
|
||||
bool success = parse_html(html, *document, *document);
|
||||
ASSERT(success);
|
||||
|
||||
document->fixup();
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
|
||||
class DocumentFragment;
|
||||
|
||||
NonnullRefPtr<Document> parse_html_document(const StringView&, const URL& = URL());
|
||||
NonnullRefPtr<Document> parse_html(const StringView&, const URL& = URL());
|
||||
RefPtr<DocumentFragment> parse_html_fragment(Document&, const StringView&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue