From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/html/DOMURL.h | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) (limited to 'Source/WebCore/html/DOMURL.h') diff --git a/Source/WebCore/html/DOMURL.h b/Source/WebCore/html/DOMURL.h index 7d214d1cb..10a7f7070 100644 --- a/Source/WebCore/html/DOMURL.h +++ b/Source/WebCore/html/DOMURL.h @@ -24,36 +24,44 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DOMURL_h -#define DOMURL_h +#pragma once +#include "ExceptionOr.h" #include "URL.h" +#include "URLUtils.h" #include -#include -#include -#include namespace WebCore { class Blob; class ScriptExecutionContext; class URLRegistrable; +class URLSearchParams; -class DOMURL : public RefCounted { - +class DOMURL : public RefCounted, public URLUtils { public: - static PassRefPtr create() { return adoptRef(new DOMURL); } + static ExceptionOr> create(const String& url, const String& base); + static ExceptionOr> create(const String& url, const DOMURL& base); + static ExceptionOr> create(const String& url); + ~DOMURL(); + + URL href() const { return m_url; } + ExceptionOr setHref(const String& url); + void setQuery(const String&); + + URLSearchParams& searchParams(); -#if ENABLE(BLOB) - static void contextDestroyed(ScriptExecutionContext*); + static String createObjectURL(ScriptExecutionContext&, Blob&); + static void revokeObjectURL(ScriptExecutionContext&, const String&); - static String createObjectURL(ScriptExecutionContext*, Blob*); - static void revokeObjectURL(ScriptExecutionContext*, const String&); + static String createPublicURL(ScriptExecutionContext&, URLRegistrable&); - static String createPublicURL(ScriptExecutionContext*, URLRegistrable*); -#endif +private: + DOMURL(URL&& completeURL, URL&& baseURL); + + URL m_baseURL; + URL m_url; + RefPtr m_searchParams; }; } // namespace WebCore - -#endif // DOMURL_h -- cgit v1.2.1