webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Static Public Member Functions | Friends | List of all members
WebCore::URL Class Reference

#include <URL.h>

Public Member Functions

 URL ()
 
WEBCORE_EXPORT URL (ParsedURLStringTag, const String &)
 
 URL (WTF::HashTableDeletedValueType)
 
bool isHashTableDeletedValue () const
 
WEBCORE_EXPORT URL (const URL &base, const String &relative)
 
 URL (const URL &base, const String &relative, const TextEncoding &)
 
String strippedForUseAsReferrer () const
 
WEBCORE_EXPORT URL isolatedCopy () const
 
bool isNull () const
 
bool isEmpty () const
 
bool isValid () const
 
bool canSetHostOrPort () const
 
bool canSetPathname () const
 
bool isHierarchical () const
 
const Stringstring () const
 
WEBCORE_EXPORT String stringCenterEllipsizedToLength (unsigned length=1024) const
 
WEBCORE_EXPORT StringView protocol () const
 
WEBCORE_EXPORT String host () const
 
WEBCORE_EXPORT std::optional< uint16_tport () const
 
WEBCORE_EXPORT String hostAndPort () const
 
WEBCORE_EXPORT String protocolHostAndPort () const
 
WEBCORE_EXPORT String user () const
 
WEBCORE_EXPORT String pass () const
 
WEBCORE_EXPORT String path () const
 
WEBCORE_EXPORT String lastPathComponent () const
 
WEBCORE_EXPORT String query () const
 
WEBCORE_EXPORT String fragmentIdentifier () const
 
WEBCORE_EXPORT bool hasFragmentIdentifier () const
 
bool hasUsername () const
 
bool hasPassword () const
 
bool hasQuery () const
 
bool hasFragment () const
 
String encodedUser () const
 
String encodedPass () const
 
WEBCORE_EXPORT String baseAsString () const
 
WEBCORE_EXPORT String fileSystemPath () const
 
WEBCORE_EXPORT bool protocolIs (const char *) const
 
bool protocolIs (StringView) const
 
bool protocolIsBlob () const
 
bool protocolIsData () const
 
bool protocolIsInHTTPFamily () const
 
WEBCORE_EXPORT bool isLocalFile () const
 
bool isBlankURL () const
 
bool cannotBeABaseURL () const
 
WEBCORE_EXPORT bool setProtocol (const String &)
 
void setHost (const String &)
 
void removePort ()
 
void setPort (unsigned short)
 
void setHostAndPort (const String &)
 
void setUser (const String &)
 
void setPass (const String &)
 
WEBCORE_EXPORT void setPath (const String &)
 
void setQuery (const String &)
 
void setFragmentIdentifier (StringView)
 
void removeFragmentIdentifier ()
 
unsigned hostStart () const
 
unsigned hostEnd () const
 
unsigned pathStart () const
 
unsigned pathEnd () const
 
unsigned pathAfterLastSlash () const
 
 operator const String & () const
 
void print () const
 
template<class Encoder >
void encode (Encoder &) const
 
String serialize (bool omitFragment=false) const
 
 URL ()
 
WEBCORE_EXPORT URL (ParsedURLStringTag, const String &)
 
 URL (WTF::HashTableDeletedValueType)
 
bool isHashTableDeletedValue () const
 
WEBCORE_EXPORT URL (const URL &base, const String &relative)
 
 URL (const URL &base, const String &relative, const TextEncoding &)
 
String strippedForUseAsReferrer () const
 
WEBCORE_EXPORT URL isolatedCopy () const
 
bool isNull () const
 
bool isEmpty () const
 
bool isValid () const
 
bool canSetHostOrPort () const
 
bool canSetPathname () const
 
bool isHierarchical () const
 
const Stringstring () const
 
WEBCORE_EXPORT String stringCenterEllipsizedToLength (unsigned length=1024) const
 
WEBCORE_EXPORT StringView protocol () const
 
WEBCORE_EXPORT String host () const
 
WEBCORE_EXPORT std::optional< uint16_tport () const
 
WEBCORE_EXPORT String hostAndPort () const
 
WEBCORE_EXPORT String protocolHostAndPort () const
 
WEBCORE_EXPORT String user () const
 
WEBCORE_EXPORT String pass () const
 
WEBCORE_EXPORT String path () const
 
WEBCORE_EXPORT String lastPathComponent () const
 
WEBCORE_EXPORT String query () const
 
WEBCORE_EXPORT String fragmentIdentifier () const
 
WEBCORE_EXPORT bool hasFragmentIdentifier () const
 
bool hasUsername () const
 
bool hasPassword () const
 
bool hasQuery () const
 
bool hasFragment () const
 
String encodedUser () const
 
String encodedPass () const
 
WEBCORE_EXPORT String baseAsString () const
 
WEBCORE_EXPORT String fileSystemPath () const
 
WEBCORE_EXPORT bool protocolIs (const char *) const
 
bool protocolIs (StringView) const
 
bool protocolIsBlob () const
 
bool protocolIsData () const
 
bool protocolIsInHTTPFamily () const
 
WEBCORE_EXPORT bool isLocalFile () const
 
bool isBlankURL () const
 
bool cannotBeABaseURL () const
 
WEBCORE_EXPORT bool setProtocol (const String &)
 
void setHost (const String &)
 
void removePort ()
 
void setPort (unsigned short)
 
void setHostAndPort (const String &)
 
void setUser (const String &)
 
void setPass (const String &)
 
WEBCORE_EXPORT void setPath (const String &)
 
void setQuery (const String &)
 
void setFragmentIdentifier (StringView)
 
void removeFragmentIdentifier ()
 
unsigned hostStart () const
 
unsigned hostEnd () const
 
unsigned pathStart () const
 
unsigned pathEnd () const
 
unsigned pathAfterLastSlash () const
 
 operator const String & () const
 
void print () const
 
template<class Encoder >
void encode (Encoder &) const
 
String serialize (bool omitFragment=false) const
 

Static Public Member Functions

static URL fakeURLWithRelativePart (const String &)
 
static URL fileURLWithFileSystemPath (const String &)
 
template<class Decoder >
static bool decode (Decoder &, URL &)
 
static URL fakeURLWithRelativePart (const String &)
 
static URL fileURLWithFileSystemPath (const String &)
 
template<class Decoder >
static bool decode (Decoder &, URL &)
 

Friends

class URLParser
 
WEBCORE_EXPORT friend bool equalIgnoringFragmentIdentifier (const URL &, const URL &)
 
WEBCORE_EXPORT friend bool protocolHostAndPortAreEqual (const URL &, const URL &)
 
WEBCORE_EXPORT friend bool equalIgnoringFragmentIdentifier (const URL &, const URL &)
 
WEBCORE_EXPORT friend bool protocolHostAndPortAreEqual (const URL &, const URL &)
 

Constructor & Destructor Documentation

◆ URL() [1/10]

WebCore::URL::URL ( )
inline

◆ URL() [2/10]

WebCore::URL::URL ( ParsedURLStringTag  ,
const String url 
)

◆ URL() [3/10]

WebCore::URL::URL ( WTF::HashTableDeletedValueType  )
inlineexplicit

◆ URL() [4/10]

WebCore::URL::URL ( const URL base,
const String relative 
)

◆ URL() [5/10]

WebCore::URL::URL ( const URL base,
const String relative,
const TextEncoding encoding 
)

◆ URL() [6/10]

WebCore::URL::URL ( )
inline

◆ URL() [7/10]

WEBCORE_EXPORT WebCore::URL::URL ( ParsedURLStringTag  ,
const String  
)

◆ URL() [8/10]

WebCore::URL::URL ( WTF::HashTableDeletedValueType  )
inlineexplicit

◆ URL() [9/10]

WEBCORE_EXPORT WebCore::URL::URL ( const URL base,
const String relative 
)

◆ URL() [10/10]

WebCore::URL::URL ( const URL base,
const String relative,
const TextEncoding  
)

Member Function Documentation

◆ baseAsString() [1/2]

String WebCore::URL::baseAsString ( ) const

◆ baseAsString() [2/2]

WEBCORE_EXPORT String WebCore::URL::baseAsString ( ) const

◆ cannotBeABaseURL() [1/2]

bool WebCore::URL::cannotBeABaseURL ( ) const
inline

◆ cannotBeABaseURL() [2/2]

bool WebCore::URL::cannotBeABaseURL ( ) const
inline

◆ canSetHostOrPort() [1/2]

bool WebCore::URL::canSetHostOrPort ( ) const
inline

◆ canSetHostOrPort() [2/2]

bool WebCore::URL::canSetHostOrPort ( ) const
inline

◆ canSetPathname() [1/2]

bool WebCore::URL::canSetPathname ( ) const
inline

◆ canSetPathname() [2/2]

bool WebCore::URL::canSetPathname ( ) const
inline

◆ decode() [1/2]

template<class Decoder >
bool WebCore::URL::decode ( Decoder &  decoder,
URL url 
)
static

◆ decode() [2/2]

template<class Decoder >
static bool WebCore::URL::decode ( Decoder &  ,
URL  
)
static

◆ encode() [1/2]

template<class Encoder >
void WebCore::URL::encode ( Encoder &  encoder) const

◆ encode() [2/2]

template<class Encoder >
void WebCore::URL::encode ( Encoder &  ) const

◆ encodedPass() [1/2]

String WebCore::URL::encodedPass ( ) const

◆ encodedPass() [2/2]

String WebCore::URL::encodedPass ( ) const

◆ encodedUser() [1/2]

String WebCore::URL::encodedUser ( ) const

◆ encodedUser() [2/2]

String WebCore::URL::encodedUser ( ) const

◆ fakeURLWithRelativePart() [1/2]

static URL WebCore::URL::fakeURLWithRelativePart ( const String )
static

◆ fakeURLWithRelativePart() [2/2]

URL WebCore::URL::fakeURLWithRelativePart ( const String relativePart)
static

◆ fileSystemPath() [1/2]

String WebCore::URL::fileSystemPath ( ) const

◆ fileSystemPath() [2/2]

WEBCORE_EXPORT String WebCore::URL::fileSystemPath ( ) const

◆ fileURLWithFileSystemPath() [1/2]

static URL WebCore::URL::fileURLWithFileSystemPath ( const String )
static

◆ fileURLWithFileSystemPath() [2/2]

URL WebCore::URL::fileURLWithFileSystemPath ( const String filePath)
static

◆ fragmentIdentifier() [1/2]

WEBCORE_EXPORT String WebCore::URL::fragmentIdentifier ( ) const

◆ fragmentIdentifier() [2/2]

String WebCore::URL::fragmentIdentifier ( ) const

◆ hasFragment() [1/2]

bool WebCore::URL::hasFragment ( ) const

◆ hasFragment() [2/2]

bool WebCore::URL::hasFragment ( ) const
inline

◆ hasFragmentIdentifier() [1/2]

WEBCORE_EXPORT bool WebCore::URL::hasFragmentIdentifier ( ) const

◆ hasFragmentIdentifier() [2/2]

bool WebCore::URL::hasFragmentIdentifier ( ) const

◆ hasPassword() [1/2]

bool WebCore::URL::hasPassword ( ) const

◆ hasPassword() [2/2]

bool WebCore::URL::hasPassword ( ) const
inline

◆ hasQuery() [1/2]

bool WebCore::URL::hasQuery ( ) const

◆ hasQuery() [2/2]

bool WebCore::URL::hasQuery ( ) const
inline

◆ hasUsername() [1/2]

bool WebCore::URL::hasUsername ( ) const

◆ hasUsername() [2/2]

bool WebCore::URL::hasUsername ( ) const
inline

◆ host() [1/2]

WEBCORE_EXPORT String WebCore::URL::host ( ) const

◆ host() [2/2]

String WebCore::URL::host ( ) const

◆ hostAndPort() [1/2]

String WebCore::URL::hostAndPort ( ) const

◆ hostAndPort() [2/2]

WEBCORE_EXPORT String WebCore::URL::hostAndPort ( ) const

◆ hostEnd() [1/2]

unsigned WebCore::URL::hostEnd ( ) const
inline

◆ hostEnd() [2/2]

unsigned WebCore::URL::hostEnd ( ) const

◆ hostStart() [1/2]

unsigned WebCore::URL::hostStart ( ) const
inline

◆ hostStart() [2/2]

unsigned WebCore::URL::hostStart ( ) const

◆ isBlankURL() [1/2]

bool WebCore::URL::isBlankURL ( ) const

◆ isBlankURL() [2/2]

bool WebCore::URL::isBlankURL ( ) const

◆ isEmpty() [1/2]

bool WebCore::URL::isEmpty ( ) const

◆ isEmpty() [2/2]

bool WebCore::URL::isEmpty ( void  ) const
inline

◆ isHashTableDeletedValue() [1/2]

bool WebCore::URL::isHashTableDeletedValue ( ) const
inline

◆ isHashTableDeletedValue() [2/2]

bool WebCore::URL::isHashTableDeletedValue ( ) const
inline

◆ isHierarchical() [1/2]

bool WebCore::URL::isHierarchical ( ) const

◆ isHierarchical() [2/2]

bool WebCore::URL::isHierarchical ( ) const

◆ isLocalFile() [1/2]

bool WebCore::URL::isLocalFile ( ) const

◆ isLocalFile() [2/2]

WEBCORE_EXPORT bool WebCore::URL::isLocalFile ( ) const

◆ isNull() [1/2]

bool WebCore::URL::isNull ( ) const

◆ isNull() [2/2]

bool WebCore::URL::isNull ( ) const
inline

◆ isolatedCopy() [1/2]

WEBCORE_EXPORT URL WebCore::URL::isolatedCopy ( ) const

◆ isolatedCopy() [2/2]

URL WebCore::URL::isolatedCopy ( ) const

◆ isValid() [1/2]

bool WebCore::URL::isValid ( ) const

◆ isValid() [2/2]

bool WebCore::URL::isValid ( ) const
inline

◆ lastPathComponent() [1/2]

WEBCORE_EXPORT String WebCore::URL::lastPathComponent ( ) const

◆ lastPathComponent() [2/2]

String WebCore::URL::lastPathComponent ( ) const

◆ operator const String &() [1/2]

WebCore::URL::operator const String & ( ) const
inline

◆ operator const String &() [2/2]

WebCore::URL::operator const String & ( ) const
inline

◆ pass() [1/2]

String WebCore::URL::pass ( ) const

◆ pass() [2/2]

WEBCORE_EXPORT String WebCore::URL::pass ( ) const

◆ path() [1/2]

WEBCORE_EXPORT String WebCore::URL::path ( ) const

◆ path() [2/2]

String WebCore::URL::path ( ) const

◆ pathAfterLastSlash() [1/2]

unsigned WebCore::URL::pathAfterLastSlash ( ) const
inline

◆ pathAfterLastSlash() [2/2]

unsigned WebCore::URL::pathAfterLastSlash ( ) const

◆ pathEnd() [1/2]

unsigned WebCore::URL::pathEnd ( ) const

◆ pathEnd() [2/2]

unsigned WebCore::URL::pathEnd ( ) const
inline

◆ pathStart() [1/2]

unsigned WebCore::URL::pathStart ( ) const
inline

◆ pathStart() [2/2]

unsigned WebCore::URL::pathStart ( ) const

◆ port() [1/2]

std::optional< uint16_t > WebCore::URL::port ( ) const

◆ port() [2/2]

WEBCORE_EXPORT std::optional<uint16_t> WebCore::URL::port ( ) const

◆ print() [1/2]

void WebCore::URL::print ( ) const

◆ print() [2/2]

void WebCore::URL::print ( ) const

◆ protocol() [1/2]

WEBCORE_EXPORT StringView WebCore::URL::protocol ( ) const

◆ protocol() [2/2]

StringView WebCore::URL::protocol ( ) const

◆ protocolHostAndPort() [1/2]

String WebCore::URL::protocolHostAndPort ( ) const

◆ protocolHostAndPort() [2/2]

WEBCORE_EXPORT String WebCore::URL::protocolHostAndPort ( ) const

◆ protocolIs() [1/4]

bool WebCore::URL::protocolIs ( const char *  protocol) const

◆ protocolIs() [2/4]

WEBCORE_EXPORT bool WebCore::URL::protocolIs ( const char *  ) const

◆ protocolIs() [3/4]

bool WebCore::URL::protocolIs ( StringView  protocol) const

◆ protocolIs() [4/4]

bool WebCore::URL::protocolIs ( StringView  ) const

◆ protocolIsBlob() [1/2]

bool WebCore::URL::protocolIsBlob ( ) const
inline

◆ protocolIsBlob() [2/2]

bool WebCore::URL::protocolIsBlob ( ) const
inline

◆ protocolIsData() [1/2]

bool WebCore::URL::protocolIsData ( ) const
inline

◆ protocolIsData() [2/2]

bool WebCore::URL::protocolIsData ( ) const
inline

◆ protocolIsInHTTPFamily() [1/2]

bool WebCore::URL::protocolIsInHTTPFamily ( ) const

◆ protocolIsInHTTPFamily() [2/2]

bool WebCore::URL::protocolIsInHTTPFamily ( ) const
inline

◆ query() [1/2]

String WebCore::URL::query ( ) const

◆ query() [2/2]

WEBCORE_EXPORT String WebCore::URL::query ( ) const

◆ removeFragmentIdentifier() [1/2]

void WebCore::URL::removeFragmentIdentifier ( )

◆ removeFragmentIdentifier() [2/2]

void WebCore::URL::removeFragmentIdentifier ( )

◆ removePort() [1/2]

void WebCore::URL::removePort ( )

◆ removePort() [2/2]

void WebCore::URL::removePort ( )

◆ serialize() [1/2]

String WebCore::URL::serialize ( bool  omitFragment = false) const

◆ serialize() [2/2]

String WebCore::URL::serialize ( bool  omitFragment = false) const

◆ setFragmentIdentifier() [1/2]

void WebCore::URL::setFragmentIdentifier ( StringView  )

◆ setFragmentIdentifier() [2/2]

void WebCore::URL::setFragmentIdentifier ( StringView  identifier)

◆ setHost() [1/2]

void WebCore::URL::setHost ( const String s)

◆ setHost() [2/2]

void WebCore::URL::setHost ( const String )

◆ setHostAndPort() [1/2]

void WebCore::URL::setHostAndPort ( const String )

◆ setHostAndPort() [2/2]

void WebCore::URL::setHostAndPort ( const String hostAndPort)

◆ setPass() [1/2]

void WebCore::URL::setPass ( const String password)

◆ setPass() [2/2]

void WebCore::URL::setPass ( const String )

◆ setPath() [1/2]

WEBCORE_EXPORT void WebCore::URL::setPath ( const String )

◆ setPath() [2/2]

void WebCore::URL::setPath ( const String s)

◆ setPort() [1/2]

void WebCore::URL::setPort ( unsigned  short)

◆ setPort() [2/2]

void WebCore::URL::setPort ( unsigned short  i)

◆ setProtocol() [1/2]

bool WebCore::URL::setProtocol ( const String s)

◆ setProtocol() [2/2]

WEBCORE_EXPORT bool WebCore::URL::setProtocol ( const String )

◆ setQuery() [1/2]

void WebCore::URL::setQuery ( const String )

◆ setQuery() [2/2]

void WebCore::URL::setQuery ( const String query)

◆ setUser() [1/2]

void WebCore::URL::setUser ( const String user)

◆ setUser() [2/2]

void WebCore::URL::setUser ( const String )

◆ string() [1/2]

const String& WebCore::URL::string ( ) const
inline

◆ string() [2/2]

const String& WebCore::URL::string ( ) const
inline

◆ stringCenterEllipsizedToLength() [1/2]

WEBCORE_EXPORT String WebCore::URL::stringCenterEllipsizedToLength ( unsigned  length = 1024) const

◆ stringCenterEllipsizedToLength() [2/2]

String WebCore::URL::stringCenterEllipsizedToLength ( unsigned  length = 1024) const

◆ strippedForUseAsReferrer() [1/2]

String WebCore::URL::strippedForUseAsReferrer ( ) const

◆ strippedForUseAsReferrer() [2/2]

String WebCore::URL::strippedForUseAsReferrer ( ) const

◆ user() [1/2]

String WebCore::URL::user ( ) const

◆ user() [2/2]

WEBCORE_EXPORT String WebCore::URL::user ( ) const

Friends And Related Function Documentation

◆ equalIgnoringFragmentIdentifier [1/2]

WEBCORE_EXPORT friend bool equalIgnoringFragmentIdentifier ( const URL ,
const URL  
)
friend

◆ equalIgnoringFragmentIdentifier [2/2]

WEBCORE_EXPORT friend bool equalIgnoringFragmentIdentifier ( const URL ,
const URL  
)
friend

◆ protocolHostAndPortAreEqual [1/2]

WEBCORE_EXPORT friend bool protocolHostAndPortAreEqual ( const URL ,
const URL  
)
friend

◆ protocolHostAndPortAreEqual [2/2]

WEBCORE_EXPORT friend bool protocolHostAndPortAreEqual ( const URL ,
const URL  
)
friend

◆ URLParser

URLParser
friend

The documentation for this class was generated from the following files: