summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/URL.h
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-09-28 16:39:37 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:31:01 +0000
commit9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c (patch)
tree322337ad0acbc75732f916376ec6d36e7ec0e5bc /Source/WebCore/platform/URL.h
parent6882a04fb36642862b11efe514251d32070c3d65 (diff)
Imported WebKit commit eb954cdcf58f9b915b2fcb6f8e4cb3a60650a4f3
Change-Id: I8dda875c38075d43b76fe3a21acb0ffa102bb82d Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebCore/platform/URL.h')
-rw-r--r--Source/WebCore/platform/URL.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/WebCore/platform/URL.h b/Source/WebCore/platform/URL.h
index 5fcee4880..f9bfce6dc 100644
--- a/Source/WebCore/platform/URL.h
+++ b/Source/WebCore/platform/URL.h
@@ -120,6 +120,9 @@ public:
WEBCORE_EXPORT String fragmentIdentifier() const;
WEBCORE_EXPORT bool hasFragmentIdentifier() const;
+ bool hasUsername() const;
+ bool hasPassword() const;
+
// Unlike user() and pass(), these functions don't decode escape sequences.
// This is necessary for accurate round-tripping, because encoding doesn't encode '%' characters.
String encodedUser() const;
@@ -354,6 +357,16 @@ inline bool URL::hasPort() const
return m_hostEnd < m_portEnd;
}
+inline bool URL::hasUsername() const
+{
+ return m_userEnd > m_userStart;
+}
+
+inline bool URL::hasPassword() const
+{
+ return m_passwordEnd > (m_userEnd + 1);
+}
+
inline bool URL::protocolIsInHTTPFamily() const
{
return m_protocolIsInHTTPFamily;