summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/Parser
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-06 20:31:56 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-06 20:31:56 +0100
commitf6439789db9c02216baabb197017c7a79a63ba04 (patch)
treef5ffb9d08ff060cc5beb6a58d0dd57e4ce9fa5cd /Libraries/LibHTML/Parser
parent635717ed0f0c442b8067de2e0770299731ea8df4 (diff)
downloadserenity-f6439789db9c02216baabb197017c7a79a63ba04.zip
LibHTML: Rename parse_html() => parse_html_document()
Diffstat (limited to 'Libraries/LibHTML/Parser')
-rw-r--r--Libraries/LibHTML/Parser/HTMLParser.cpp8
-rw-r--r--Libraries/LibHTML/Parser/HTMLParser.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/Libraries/LibHTML/Parser/HTMLParser.cpp b/Libraries/LibHTML/Parser/HTMLParser.cpp
index 25cf52968e..bf1accfb75 100644
--- a/Libraries/LibHTML/Parser/HTMLParser.cpp
+++ b/Libraries/LibHTML/Parser/HTMLParser.cpp
@@ -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();
diff --git a/Libraries/LibHTML/Parser/HTMLParser.h b/Libraries/LibHTML/Parser/HTMLParser.h
index f852a158a7..46dc22428a 100644
--- a/Libraries/LibHTML/Parser/HTMLParser.h
+++ b/Libraries/LibHTML/Parser/HTMLParser.h
@@ -5,5 +5,5 @@
class DocumentFragment;
-NonnullRefPtr<Document> parse_html(const StringView&, const URL& = URL());
+NonnullRefPtr<Document> parse_html_document(const StringView&, const URL& = URL());
RefPtr<DocumentFragment> parse_html_fragment(Document&, const StringView&);