mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:07:46 +00:00
LibWeb: Add the Web::URL namespace and move URLEncoder to it
This namespace will be used for all interfaces defined in the URL specification, like URL and URLSearchParams. This has the unfortunate side-effect of requiring us to use the fully qualified AK::URL name whenever we want to refer to the AK class, so this commit also fixes all such references.
This commit is contained in:
parent
2b78e227f2
commit
4629f2e4ad
54 changed files with 236 additions and 225 deletions
|
@ -93,7 +93,7 @@ static Vector<FlyString> s_quirks_public_ids = {
|
|||
"-//WebTechs//DTD Mozilla HTML//"
|
||||
};
|
||||
|
||||
RefPtr<DOM::Document> parse_html_document(const StringView& data, const URL& url, const String& encoding)
|
||||
RefPtr<DOM::Document> parse_html_document(const StringView& data, const AK::URL& url, const String& encoding)
|
||||
{
|
||||
auto document = DOM::Document::create(url);
|
||||
HTMLDocumentParser parser(document, data, encoding);
|
||||
|
@ -116,7 +116,7 @@ HTMLDocumentParser::~HTMLDocumentParser()
|
|||
m_document->set_should_invalidate_styles_on_attribute_changes(true);
|
||||
}
|
||||
|
||||
void HTMLDocumentParser::run(const URL& url)
|
||||
void HTMLDocumentParser::run(const AK::URL& url)
|
||||
{
|
||||
m_document->set_url(url);
|
||||
m_document->set_source(m_tokenizer.source());
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace Web::HTML {
|
|||
__ENUMERATE_INSERTION_MODE(AfterAfterBody) \
|
||||
__ENUMERATE_INSERTION_MODE(AfterAfterFrameset)
|
||||
|
||||
RefPtr<DOM::Document> parse_html_document(const StringView&, const URL&, const String& encoding);
|
||||
RefPtr<DOM::Document> parse_html_document(const StringView&, const AK::URL&, const String& encoding);
|
||||
|
||||
class HTMLDocumentParser {
|
||||
public:
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
static NonnullOwnPtr<HTMLDocumentParser> create_with_uncertain_encoding(DOM::Document&, const ByteBuffer& input);
|
||||
|
||||
void run(const URL&);
|
||||
void run(const AK::URL&);
|
||||
|
||||
DOM::Document& document();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue