diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/url/URL.h | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | dom/url/URL.h | 85 |
1 files changed, 41 insertions, 44 deletions
diff --git a/dom/url/URL.h b/dom/url/URL.h index 7c2563d095..cf72a7be63 100644 --- a/dom/url/URL.h +++ b/dom/url/URL.h @@ -44,79 +44,73 @@ class URL final : public URLSearchParamsObserver, public nsWrapperCache { JS::Handle<JSObject*> aGivenProto) override; static already_AddRefed<URL> Constructor(const GlobalObject& aGlobal, - const nsAString& aURL, - const Optional<nsAString>& aBase, + const nsACString& aURL, + const Optional<nsACString>& aBase, ErrorResult& aRv); static already_AddRefed<URL> Constructor(nsISupports* aParent, - const nsAString& aURL, - const nsAString& aBase, + const nsACString& aURL, + const nsACString& aBase, ErrorResult& aRv); static already_AddRefed<URL> Constructor(nsISupports* aParent, - const nsAString& aURL, nsIURI* aBase, - ErrorResult& aRv); + const nsACString& aURL, + nsIURI* aBase, ErrorResult& aRv); static void CreateObjectURL(const GlobalObject& aGlobal, Blob& aBlob, - nsAString& aResult, ErrorResult& aRv); + nsACString& aResult, ErrorResult& aRv); static void CreateObjectURL(const GlobalObject& aGlobal, MediaSource& aSource, - nsAString& aResult, ErrorResult& aRv); + nsACString& aResult, ErrorResult& aRv); static void RevokeObjectURL(const GlobalObject& aGlobal, - const nsAString& aURL, ErrorResult& aRv); + const nsACString& aURL, ErrorResult& aRv); static bool IsValidObjectURL(const GlobalObject& aGlobal, - const nsAString& aURL, ErrorResult& aRv); - - static bool CanParse(const GlobalObject& aGlobal, const nsAString& aURL, - const Optional<nsAString>& aBase); - - void GetHref(nsAString& aHref) const; - - void SetHref(const nsAString& aHref, ErrorResult& aRv); - - void GetOrigin(nsAString& aOrigin) const; - - void GetProtocol(nsAString& aProtocol) const; + const nsACString& aURL, ErrorResult& aRv); - void SetProtocol(const nsAString& aProtocol); + static already_AddRefed<URL> Parse(const GlobalObject& aGlobal, + const nsACString& aURL, + const Optional<nsACString>& aBase); - void GetUsername(nsAString& aUsername) const; + static bool CanParse(const GlobalObject& aGlobal, const nsACString& aURL, + const Optional<nsACString>& aBase); - void SetUsername(const nsAString& aUsername); + void GetHref(nsACString& aHref) const; + void SetHref(const nsACString& aHref, ErrorResult& aRv); - void GetPassword(nsAString& aPassword) const; + void GetOrigin(nsACString& aOrigin) const; - void SetPassword(const nsAString& aPassword); + void GetProtocol(nsACString& aProtocol) const; + void SetProtocol(const nsACString& aProtocol); - void GetHost(nsAString& aHost) const; + void GetUsername(nsACString& aUsername) const; + void SetUsername(const nsACString& aUsername); - void SetHost(const nsAString& aHost); + void GetPassword(nsACString& aPassword) const; + void SetPassword(const nsACString& aPassword); - void GetHostname(nsAString& aHostname) const; + void GetHost(nsACString& aHost) const; + void SetHost(const nsACString& aHost); - void SetHostname(const nsAString& aHostname); + void GetHostname(nsACString& aHostname) const; + void SetHostname(const nsACString& aHostname); - void GetPort(nsAString& aPort) const; + void GetPort(nsACString& aPort) const; + void SetPort(const nsACString& aPort); - void SetPort(const nsAString& aPort); + void GetPathname(nsACString& aPathname) const; + void SetPathname(const nsACString& aPathname); - void GetPathname(nsAString& aPathname) const; - - void SetPathname(const nsAString& aPathname); - - void GetSearch(nsAString& aSearch) const; - - void SetSearch(const nsAString& aSearch); + void GetSearch(nsACString& aSearch) const; + void SetSearch(const nsACString& aSearch); URLSearchParams* SearchParams(); - void GetHash(nsAString& aHost) const; + void GetHash(nsACString& aHash) const; + void SetHash(const nsACString& aHash); - void SetHash(const nsAString& aHash); - - void ToJSON(nsAString& aResult) const { GetHref(aResult); } + void ToJSON(nsACString& aResult) const { GetHref(aResult); } // URLSearchParamsObserver void URLSearchParamsUpdated(URLSearchParams* aSearchParams) override; @@ -127,10 +121,13 @@ class URL final : public URLSearchParamsObserver, public nsWrapperCache { private: ~URL() = default; + static already_AddRefed<nsIURI> ParseURI(const nsACString& aURL, + const Optional<nsACString>& aBase); + void UpdateURLSearchParams(); private: - void SetSearchInternal(const nsAString& aSearch); + void SetSearchInternal(const nsACString& aSearch); void CreateSearchParamsIfNeeded(); |