1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:57:35 +00:00

AK: Accept optional url and state override parameters in URLParser

These are required in the specification and used by the web's URL
built-in, this commit also removes the Badge<AK::URL> from URLParser
to allow other classes that need to call the parser directly like the
web's URL built-in to do so.
This commit is contained in:
Idan Horowitz 2021-09-13 22:34:14 +03:00 committed by Andreas Kling
parent 6fa4fc8353
commit 55b67ba7a7
3 changed files with 116 additions and 114 deletions

View file

@ -55,7 +55,7 @@ public:
VERIFY_NOT_REACHED();
}
static URL parse(Badge<URL>, StringView const& input, URL const* base_url = nullptr);
static URL parse(StringView const& input, URL const* base_url = nullptr, Optional<URL> url = {}, Optional<State> state_override = {});
private:
static Optional<URL> parse_data_url(StringView const& raw_input);