зеркало из https://github.com/mozilla/pjs.git
Bug 235504 Remove nsCString::EqualsWithConversion(const char*)
r=darin sr=dbaron
This commit is contained in:
Родитель
bce33ecb2f
Коммит
6330e24449
|
@ -360,7 +360,7 @@ struct DomainEntry
|
|||
return PR_FALSE;
|
||||
if (mOrigin.RFindChar(':', thisLen-1, 1) != -1)
|
||||
//-- Policy applies to all URLs of this scheme, compare scheme only
|
||||
return mOrigin.EqualsWithConversion(anOrigin, PR_TRUE, thisLen);
|
||||
return mOrigin.EqualsIgnoreCase(anOrigin, thisLen);
|
||||
|
||||
//-- Policy applies to a particular host; compare domains
|
||||
if (!mOrigin.Equals(anOrigin + (len - thisLen)))
|
||||
|
|
|
@ -260,10 +260,10 @@ COtherDTD::CanParse(CParserContext& aParserContext, const nsString& aBuffer,
|
|||
|
||||
if(mEnableStrict) {
|
||||
if(aParserContext.mParserCommand != eViewSource) {
|
||||
if(PR_TRUE==aParserContext.mMimeType.EqualsWithConversion(kPlainTextContentType)) {
|
||||
if(PR_TRUE==aParserContext.mMimeType.Equals(kPlainTextContentType)) {
|
||||
result=eValidDetect;
|
||||
}
|
||||
else if(PR_TRUE==aParserContext.mMimeType.EqualsWithConversion(kHTMLTextContentType)) {
|
||||
else if(PR_TRUE==aParserContext.mMimeType.Equals(kHTMLTextContentType)) {
|
||||
switch(aParserContext.mDTDMode) {
|
||||
case eDTDMode_full_standards:
|
||||
case eDTDMode_almost_standards:
|
||||
|
|
|
@ -975,14 +975,14 @@ nsExpatDriver::CanParse(CParserContext& aParserContext,
|
|||
eAutoDetectResult result = eUnknownDetect;
|
||||
|
||||
if (eViewSource != aParserContext.mParserCommand) {
|
||||
if (aParserContext.mMimeType.EqualsWithConversion(kXMLTextContentType) ||
|
||||
aParserContext.mMimeType.EqualsWithConversion(kXMLApplicationContentType) ||
|
||||
aParserContext.mMimeType.EqualsWithConversion(kXHTMLApplicationContentType)||
|
||||
aParserContext.mMimeType.EqualsWithConversion(kRDFTextContentType) ||
|
||||
if (aParserContext.mMimeType.Equals(kXMLTextContentType) ||
|
||||
aParserContext.mMimeType.Equals(kXMLApplicationContentType) ||
|
||||
aParserContext.mMimeType.Equals(kXHTMLApplicationContentType)||
|
||||
aParserContext.mMimeType.Equals(kRDFTextContentType) ||
|
||||
#ifdef MOZ_SVG
|
||||
aParserContext.mMimeType.EqualsWithConversion(kSVGTextContentType) ||
|
||||
aParserContext.mMimeType.Equals(kSVGTextContentType) ||
|
||||
#endif
|
||||
aParserContext.mMimeType.EqualsWithConversion(kXULTextContentType)) {
|
||||
aParserContext.mMimeType.Equals(kXULTextContentType)) {
|
||||
result=ePrimaryDetect;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -61,7 +61,7 @@ NS_IMETHODIMP nsMyObserver::Notify(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
if(!mCharset.EqualsWithConversion(aCharset)) {
|
||||
if(!mCharset.Equals(aCharset)) {
|
||||
if(mNotifyByReload) {
|
||||
rv = mWebShellSvc->SetRendering( PR_FALSE);
|
||||
rv = mWebShellSvc->StopDocumentLoad();
|
||||
|
|
|
@ -961,7 +961,7 @@ nsresult nsMsgSearchTerm::MatchString (const char *stringToMatch,
|
|||
{
|
||||
if ((n_str.get())[0])
|
||||
{
|
||||
if (n_str.EqualsWithConversion(utf8, PR_TRUE /*ignore case*/) /* INTL_StrIs(csid, n_header, n_str)*/ )
|
||||
if (n_str.EqualsIgnoreCase(utf8) /* INTL_StrIs(csid, n_header, n_str)*/ )
|
||||
result = PR_TRUE;
|
||||
}
|
||||
else if (utf8[0] == '\0') // Special case for "is <the empty string>"
|
||||
|
@ -973,7 +973,7 @@ nsresult nsMsgSearchTerm::MatchString (const char *stringToMatch,
|
|||
{
|
||||
if ((n_str.get())[0])
|
||||
{
|
||||
if (!n_str.EqualsWithConversion(utf8, PR_TRUE)/* INTL_StrIs(csid, n_header, n_str)*/ )
|
||||
if (!n_str.EqualsIgnoreCase(utf8)/* INTL_StrIs(csid, n_header, n_str)*/ )
|
||||
result = PR_TRUE;
|
||||
}
|
||||
else if (utf8[0] != '\0') // Special case for "isn't <the empty string>"
|
||||
|
|
|
@ -175,7 +175,7 @@ nsMIMEInfoBase::Equals(nsIMIMEInfo *aMIMEInfo, PRBool *_retval)
|
|||
nsresult rv = aMIMEInfo->GetMIMEType(getter_Copies(type));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
*_retval = mMIMEType.EqualsWithConversion(type);
|
||||
*_retval = mMIMEType.Equals(type);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -246,6 +246,7 @@ class nsTString_CharT : public nsTSubstring_CharT
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Equality check between given string and this string.
|
||||
*
|
||||
|
@ -254,7 +255,11 @@ class nsTString_CharT : public nsTSubstring_CharT
|
|||
* @param aCount tells us how many chars to compare
|
||||
* @return boolean
|
||||
*/
|
||||
|
||||
#ifdef CharT_is_char
|
||||
PRBool EqualsIgnoreCase( const char* aString, PRInt32 aCount=-1 ) const {
|
||||
return Compare(aString, PR_TRUE, aCount) == 0;
|
||||
}
|
||||
#else
|
||||
NS_COM PRBool EqualsWithConversion( const char* aString, PRBool aIgnoreCase=PR_FALSE, PRInt32 aCount=-1 ) const;
|
||||
PRBool EqualsIgnoreCase( const char* aString, PRInt32 aCount=-1 ) const
|
||||
{
|
||||
|
@ -262,8 +267,6 @@ class nsTString_CharT : public nsTSubstring_CharT
|
|||
}
|
||||
|
||||
|
||||
#ifdef CharT_is_PRUnichar
|
||||
|
||||
/**
|
||||
* Determine if given buffer is plain ascii
|
||||
*
|
||||
|
|
|
@ -1100,12 +1100,6 @@ nsString::CompareWithConversion( const char* aString, PRBool aIgnoreCase, PRInt3
|
|||
return result;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsCString::EqualsWithConversion( const char* aString, PRBool aIgnoreCase, PRInt32 aCount ) const
|
||||
{
|
||||
return Compare(aString, aIgnoreCase, aCount) == 0;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsString::EqualsWithConversion( const char* aString, PRBool aIgnoreCase, PRInt32 aCount ) const
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче