diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/DOMURL.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/html/DOMURL.h')
-rw-r--r-- | Source/WebCore/html/DOMURL.h | 40 |
1 files changed, 24 insertions, 16 deletions
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 <wtf/HashSet.h> -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> -#include <wtf/text/WTFString.h> namespace WebCore { class Blob; class ScriptExecutionContext; class URLRegistrable; +class URLSearchParams; -class DOMURL : public RefCounted<DOMURL> { - +class DOMURL : public RefCounted<DOMURL>, public URLUtils<DOMURL> { public: - static PassRefPtr<DOMURL> create() { return adoptRef(new DOMURL); } + static ExceptionOr<Ref<DOMURL>> create(const String& url, const String& base); + static ExceptionOr<Ref<DOMURL>> create(const String& url, const DOMURL& base); + static ExceptionOr<Ref<DOMURL>> create(const String& url); + ~DOMURL(); + + URL href() const { return m_url; } + ExceptionOr<void> 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<URLSearchParams> m_searchParams; }; } // namespace WebCore - -#endif // DOMURL_h |