зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows. - nsSubstring --> nsAString - nsCSubstring --> nsACString --HG-- extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
This commit is contained in:
Родитель
fe9268c4cd
Коммит
f1364a75ea
|
@ -633,9 +633,9 @@ nsCoreUtils::ScrollTo(nsIPresShell* aPresShell, nsIContent* aContent,
|
|||
}
|
||||
|
||||
bool
|
||||
nsCoreUtils::IsWhitespaceString(const nsSubstring& aString)
|
||||
nsCoreUtils::IsWhitespaceString(const nsAString& aString)
|
||||
{
|
||||
nsSubstring::const_char_iterator iterBegin, iterEnd;
|
||||
nsAString::const_char_iterator iterBegin, iterEnd;
|
||||
|
||||
aString.BeginReading(iterBegin);
|
||||
aString.EndReading(iterEnd);
|
||||
|
|
|
@ -299,7 +299,7 @@ public:
|
|||
* only. In contrast to nsWhitespaceTokenizer class it takes into account
|
||||
* non-breaking space (0xa0).
|
||||
*/
|
||||
static bool IsWhitespaceString(const nsSubstring& aString);
|
||||
static bool IsWhitespaceString(const nsAString& aString);
|
||||
|
||||
/**
|
||||
* Returns true if the given character is whitespace symbol.
|
||||
|
|
|
@ -11427,7 +11427,7 @@ nsDocShell::AddHeadersToChannel(nsIInputStream* aHeadersData,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
const nsCSubstring& oneHeader = StringHead(headersString, crlf);
|
||||
const nsACString& oneHeader = StringHead(headersString, crlf);
|
||||
|
||||
colon = oneHeader.FindChar(':');
|
||||
if (colon == kNotFound) {
|
||||
|
|
|
@ -401,7 +401,7 @@ Navigator::GetAcceptLanguages(nsTArray<nsString>& aLanguages)
|
|||
int32_t pos = 0;
|
||||
bool first = true;
|
||||
while (localeTokenizer.hasMoreTokens()) {
|
||||
const nsSubstring& code = localeTokenizer.nextToken();
|
||||
const nsAString& code = localeTokenizer.nextToken();
|
||||
|
||||
if (code.Length() == 2 && !first) {
|
||||
nsAutoString upper(code);
|
||||
|
|
|
@ -356,7 +356,7 @@ nsContentSink::DoProcessLinkHeader()
|
|||
// see <http://tools.ietf.org/html/rfc5988#section-5.2>
|
||||
|
||||
bool
|
||||
nsContentSink::LinkContextIsOurDocument(const nsSubstring& aAnchor)
|
||||
nsContentSink::LinkContextIsOurDocument(const nsAString& aAnchor)
|
||||
{
|
||||
if (aAnchor.IsEmpty()) {
|
||||
// anchor parameter not present or empty -> same document reference
|
||||
|
@ -680,10 +680,10 @@ nsContentSink::ProcessLinkHeader(const nsAString& aLinkData)
|
|||
|
||||
|
||||
nsresult
|
||||
nsContentSink::ProcessLink(const nsSubstring& aAnchor, const nsSubstring& aHref,
|
||||
const nsSubstring& aRel, const nsSubstring& aTitle,
|
||||
const nsSubstring& aType, const nsSubstring& aMedia,
|
||||
const nsSubstring& aCrossOrigin)
|
||||
nsContentSink::ProcessLink(const nsAString& aAnchor, const nsAString& aHref,
|
||||
const nsAString& aRel, const nsAString& aTitle,
|
||||
const nsAString& aType, const nsAString& aMedia,
|
||||
const nsAString& aCrossOrigin)
|
||||
{
|
||||
uint32_t linkTypes =
|
||||
nsStyleLinkElement::ParseLinkTypes(aRel);
|
||||
|
@ -734,11 +734,11 @@ nsContentSink::ProcessLink(const nsSubstring& aAnchor, const nsSubstring& aHref,
|
|||
|
||||
nsresult
|
||||
nsContentSink::ProcessStyleLink(nsIContent* aElement,
|
||||
const nsSubstring& aHref,
|
||||
const nsAString& aHref,
|
||||
bool aAlternate,
|
||||
const nsSubstring& aTitle,
|
||||
const nsSubstring& aType,
|
||||
const nsSubstring& aMedia)
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aType,
|
||||
const nsAString& aMedia)
|
||||
{
|
||||
if (aAlternate && aTitle.IsEmpty()) {
|
||||
// alternates must have title return without error, for now
|
||||
|
|
|
@ -113,7 +113,7 @@ class nsContentSink : public nsICSSLoaderObserver,
|
|||
virtual void UpdateChildCounts() = 0;
|
||||
|
||||
bool IsTimeToNotify();
|
||||
bool LinkContextIsOurDocument(const nsSubstring& aAnchor);
|
||||
bool LinkContextIsOurDocument(const nsAString& aAnchor);
|
||||
bool Decode5987Format(nsAString& aEncoded);
|
||||
|
||||
static void InitializeStatics();
|
||||
|
@ -151,17 +151,17 @@ protected:
|
|||
nsresult ProcessHeaderData(nsIAtom* aHeader, const nsAString& aValue,
|
||||
nsIContent* aContent = nullptr);
|
||||
nsresult ProcessLinkHeader(const nsAString& aLinkData);
|
||||
nsresult ProcessLink(const nsSubstring& aAnchor,
|
||||
const nsSubstring& aHref, const nsSubstring& aRel,
|
||||
const nsSubstring& aTitle, const nsSubstring& aType,
|
||||
const nsSubstring& aMedia, const nsSubstring& aCrossOrigin);
|
||||
nsresult ProcessLink(const nsAString& aAnchor,
|
||||
const nsAString& aHref, const nsAString& aRel,
|
||||
const nsAString& aTitle, const nsAString& aType,
|
||||
const nsAString& aMedia, const nsAString& aCrossOrigin);
|
||||
|
||||
virtual nsresult ProcessStyleLink(nsIContent* aElement,
|
||||
const nsSubstring& aHref,
|
||||
const nsAString& aHref,
|
||||
bool aAlternate,
|
||||
const nsSubstring& aTitle,
|
||||
const nsSubstring& aType,
|
||||
const nsSubstring& aMedia);
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aType,
|
||||
const nsAString& aMedia);
|
||||
|
||||
void PrefetchHref(const nsAString &aHref, nsINode *aSource,
|
||||
bool aExplicit);
|
||||
|
|
|
@ -1519,7 +1519,7 @@ ContentChild::RecvSetProcessSandbox(const MaybeFileDesc& aBroker)
|
|||
nsAdoptingCString extraSyscalls =
|
||||
Preferences::GetCString("security.sandbox.content.syscall_whitelist");
|
||||
if (extraSyscalls) {
|
||||
for (const nsCSubstring& callNrString : extraSyscalls.Split(',')) {
|
||||
for (const nsACString& callNrString : extraSyscalls.Split(',')) {
|
||||
nsresult rv;
|
||||
int callNr = PromiseFlatCString(callNrString).ToInteger(&rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
|
|
@ -417,7 +417,7 @@ ParseCodecsString(const nsAString& aCodecs, nsTArray<nsString>& aOutCodecs)
|
|||
bool expectMoreTokens = false;
|
||||
nsCharSeparatedTokenizer tokenizer(aCodecs, ',');
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
const nsSubstring& token = tokenizer.nextToken();
|
||||
const nsAString& token = tokenizer.nextToken();
|
||||
expectMoreTokens = tokenizer.separatorAfterCurrentToken();
|
||||
aOutCodecs.AppendElement(token);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ static bool ExtensionInList(const nsCString& aExtensionList,
|
|||
{
|
||||
nsCCharSeparatedTokenizer extensions(aExtensionList, ',');
|
||||
while (extensions.hasMoreTokens()) {
|
||||
const nsCSubstring& extension = extensions.nextToken();
|
||||
const nsACString& extension = extensions.nextToken();
|
||||
if (extension.Equals(aExtension, nsCaseInsensitiveCStringComparator())) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ FramingChecker::CheckFrameOptions(nsIChannel* aChannel,
|
|||
// be many. If any want to deny the load, deny the load.
|
||||
nsCharSeparatedTokenizer tokenizer(xfoHeaderValue, ',');
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
const nsSubstring& tok = tokenizer.nextToken();
|
||||
const nsAString& tok = tokenizer.nextToken();
|
||||
if (!CheckOneFrameOptionsPolicy(httpChannel, tok, aDocShell)) {
|
||||
// cancel the load and display about:blank
|
||||
httpChannel->Cancel(NS_BINDING_ABORTED);
|
||||
|
|
|
@ -428,7 +428,7 @@ CSP_AppendCSPFromHeader(nsIContentSecurityPolicy* aCsp,
|
|||
nsresult rv = NS_OK;
|
||||
nsCharSeparatedTokenizer tokenizer(aHeaderValue, ',');
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
const nsSubstring& policy = tokenizer.nextToken();
|
||||
const nsAString& policy = tokenizer.nextToken();
|
||||
rv = aCsp->AppendPolicy(policy, aReportOnly, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
{
|
||||
|
|
|
@ -726,7 +726,7 @@ nsContentSecurityManager::IsOriginPotentiallyTrustworthy(nsIPrincipal* aPrincipa
|
|||
if (whitelist) {
|
||||
nsCCharSeparatedTokenizer tokenizer(whitelist, ',');
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
const nsCSubstring& allowedHost = tokenizer.nextToken();
|
||||
const nsACString& allowedHost = tokenizer.nextToken();
|
||||
if (host.Equals(allowedHost)) {
|
||||
*aIsTrustWorthy = true;
|
||||
return NS_OK;
|
||||
|
|
|
@ -175,9 +175,9 @@ LocalStorage::Clear(nsIPrincipal& aSubjectPrincipal, ErrorResult& aRv)
|
|||
}
|
||||
|
||||
void
|
||||
LocalStorage::BroadcastChangeNotification(const nsSubstring& aKey,
|
||||
const nsSubstring& aOldValue,
|
||||
const nsSubstring& aNewValue)
|
||||
LocalStorage::BroadcastChangeNotification(const nsAString& aKey,
|
||||
const nsAString& aOldValue,
|
||||
const nsAString& aNewValue)
|
||||
{
|
||||
if (!XRE_IsParentProcess() && Principal()) {
|
||||
// If we are in a child process, we want to send a message to the parent in
|
||||
|
|
|
@ -115,9 +115,9 @@ private:
|
|||
// Whether this storage is running in private-browsing window.
|
||||
bool mIsPrivate : 1;
|
||||
|
||||
void BroadcastChangeNotification(const nsSubstring& aKey,
|
||||
const nsSubstring& aOldValue,
|
||||
const nsSubstring& aNewValue);
|
||||
void BroadcastChangeNotification(const nsAString& aKey,
|
||||
const nsAString& aOldValue,
|
||||
const nsAString& aNewValue);
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -84,7 +84,7 @@ PrincipalsEqual(nsIPrincipal* aObjectPrincipal,
|
|||
}
|
||||
|
||||
void
|
||||
ReverseString(const nsCSubstring& aSource, nsCSubstring& aResult)
|
||||
ReverseString(const nsACString& aSource, nsACString& aResult)
|
||||
{
|
||||
nsACString::const_iterator sourceBegin, sourceEnd;
|
||||
aSource.BeginReading(sourceBegin);
|
||||
|
|
|
@ -22,7 +22,7 @@ PrincipalsEqual(nsIPrincipal* aObjectPrincipal,
|
|||
nsIPrincipal* aSubjectPrincipal);
|
||||
|
||||
void
|
||||
ReverseString(const nsCSubstring& aSource, nsCSubstring& aResult);
|
||||
ReverseString(const nsACString& aSource, nsACString& aResult);
|
||||
|
||||
nsresult
|
||||
CreateReversedDomain(const nsACString& aAsciiDomain,
|
||||
|
|
|
@ -72,7 +72,7 @@ SVGTests::IsConditionalProcessingAttribute(const nsIAtom* aAttribute) const
|
|||
}
|
||||
|
||||
int32_t
|
||||
SVGTests::GetBestLanguagePreferenceRank(const nsSubstring& aAcceptLangs) const
|
||||
SVGTests::GetBestLanguagePreferenceRank(const nsAString& aAcceptLangs) const
|
||||
{
|
||||
const nsDefaultStringComparator defaultComparator;
|
||||
|
||||
|
@ -86,7 +86,7 @@ SVGTests::GetBestLanguagePreferenceRank(const nsSubstring& aAcceptLangs) const
|
|||
nsCharSeparatedTokenizer languageTokenizer(aAcceptLangs, ',');
|
||||
int32_t index = 0;
|
||||
while (languageTokenizer.hasMoreTokens()) {
|
||||
const nsSubstring &languageToken = languageTokenizer.nextToken();
|
||||
const nsAString& languageToken = languageTokenizer.nextToken();
|
||||
bool exactMatch = (languageToken == mStringListAttributes[LANGUAGE][i]);
|
||||
bool prefixOnlyMatch =
|
||||
!exactMatch &&
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
* or -1 if no indices match.
|
||||
* XXX This algorithm is O(M*N).
|
||||
*/
|
||||
int32_t GetBestLanguagePreferenceRank(const nsSubstring& aAcceptLangs) const;
|
||||
int32_t GetBestLanguagePreferenceRank(const nsAString& aAcceptLangs) const;
|
||||
|
||||
/**
|
||||
* Special value to pass to PassesConditionalProcessingTests to ignore systemLanguage
|
||||
|
|
|
@ -660,11 +660,11 @@ nsXMLContentSink::LoadXSLStyleSheet(nsIURI* aUrl)
|
|||
|
||||
nsresult
|
||||
nsXMLContentSink::ProcessStyleLink(nsIContent* aElement,
|
||||
const nsSubstring& aHref,
|
||||
const nsAString& aHref,
|
||||
bool aAlternate,
|
||||
const nsSubstring& aTitle,
|
||||
const nsSubstring& aType,
|
||||
const nsSubstring& aMedia)
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aType,
|
||||
const nsAString& aMedia)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
mPrettyPrintXML = false;
|
||||
|
|
|
@ -146,11 +146,11 @@ protected:
|
|||
|
||||
// nsContentSink override
|
||||
virtual nsresult ProcessStyleLink(nsIContent* aElement,
|
||||
const nsSubstring& aHref,
|
||||
const nsAString& aHref,
|
||||
bool aAlternate,
|
||||
const nsSubstring& aTitle,
|
||||
const nsSubstring& aType,
|
||||
const nsSubstring& aMedia) override;
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aType,
|
||||
const nsAString& aMedia) override;
|
||||
|
||||
nsresult LoadXSLStyleSheet(nsIURI* aUrl);
|
||||
|
||||
|
|
|
@ -92,11 +92,11 @@ protected:
|
|||
|
||||
// nsContentSink overrides
|
||||
virtual nsresult ProcessStyleLink(nsIContent* aElement,
|
||||
const nsSubstring& aHref,
|
||||
const nsAString& aHref,
|
||||
bool aAlternate,
|
||||
const nsSubstring& aTitle,
|
||||
const nsSubstring& aType,
|
||||
const nsSubstring& aMedia) override;
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aType,
|
||||
const nsAString& aMedia) override;
|
||||
nsresult LoadXSLStyleSheet(nsIURI* aUrl);
|
||||
void StartLayout();
|
||||
|
||||
|
@ -328,11 +328,11 @@ nsXMLFragmentContentSink::ReportError(const char16_t* aErrorText,
|
|||
|
||||
nsresult
|
||||
nsXMLFragmentContentSink::ProcessStyleLink(nsIContent* aElement,
|
||||
const nsSubstring& aHref,
|
||||
const nsAString& aHref,
|
||||
bool aAlternate,
|
||||
const nsSubstring& aTitle,
|
||||
const nsSubstring& aType,
|
||||
const nsSubstring& aMedia)
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aType,
|
||||
const nsAString& aMedia)
|
||||
{
|
||||
// don't process until moved to document
|
||||
return NS_OK;
|
||||
|
|
|
@ -430,7 +430,7 @@ txCoreFunctionCall::evaluate(txIEvalContext* aContext, txAExprResult** aResult)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
const nsSubstring& result = Substring(arg1, idx + arg2.Length());
|
||||
const nsAString& result = Substring(arg1, idx + arg2.Length());
|
||||
return aContext->recycler()->getStringResult(result, aResult);
|
||||
}
|
||||
case SUBSTRING_BEFORE:
|
||||
|
|
|
@ -28,7 +28,7 @@ using mozilla::Move;
|
|||
* This should move to XSLProcessor class
|
||||
*/
|
||||
nsresult
|
||||
txExprParser::createAVT(const nsSubstring& aAttrValue,
|
||||
txExprParser::createAVT(const nsAString& aAttrValue,
|
||||
txIParseContext* aContext,
|
||||
Expr** aResult)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ txExprParser::createAVT(const nsSubstring& aAttrValue,
|
|||
|
||||
nsAutoString literalString;
|
||||
bool inExpr = false;
|
||||
nsSubstring::const_char_iterator iter, start, end, avtStart;
|
||||
nsAString::const_char_iterator iter, start, end, avtStart;
|
||||
aAttrValue.BeginReading(iter);
|
||||
aAttrValue.EndReading(end);
|
||||
avtStart = iter;
|
||||
|
@ -146,7 +146,7 @@ txExprParser::createAVT(const nsSubstring& aAttrValue,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txExprParser::createExprInternal(const nsSubstring& aExpression,
|
||||
txExprParser::createExprInternal(const nsAString& aExpression,
|
||||
uint32_t aSubStringPos,
|
||||
txIParseContext* aContext, Expr** aExpr)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ class txExprParser
|
|||
{
|
||||
public:
|
||||
|
||||
static nsresult createExpr(const nsSubstring& aExpression,
|
||||
static nsresult createExpr(const nsAString& aExpression,
|
||||
txIParseContext* aContext, Expr** aExpr)
|
||||
{
|
||||
return createExprInternal(aExpression, 0, aContext, aExpr);
|
||||
|
@ -39,13 +39,13 @@ public:
|
|||
/**
|
||||
* Creates an Attribute Value Template using the given value
|
||||
*/
|
||||
static nsresult createAVT(const nsSubstring& aAttrValue,
|
||||
static nsresult createAVT(const nsAString& aAttrValue,
|
||||
txIParseContext* aContext,
|
||||
Expr** aResult);
|
||||
|
||||
|
||||
protected:
|
||||
static nsresult createExprInternal(const nsSubstring& aExpression,
|
||||
static nsresult createExprInternal(const nsAString& aExpression,
|
||||
uint32_t aSubStringPos,
|
||||
txIParseContext* aContext,
|
||||
Expr** aExpr);
|
||||
|
|
|
@ -110,7 +110,7 @@ class txStartElementTransaction : public txOutputTransaction
|
|||
{
|
||||
public:
|
||||
txStartElementTransaction(nsIAtom* aPrefix,
|
||||
const nsSubstring& aLocalName, int32_t aNsID)
|
||||
const nsAString& aLocalName, int32_t aNsID)
|
||||
: txOutputTransaction(eStartElementTransaction),
|
||||
mPrefix(aPrefix),
|
||||
mLocalName(aLocalName),
|
||||
|
@ -131,7 +131,7 @@ class txAttributeTransaction : public txOutputTransaction
|
|||
{
|
||||
public:
|
||||
txAttributeTransaction(nsIAtom* aPrefix,
|
||||
const nsSubstring& aLocalName, int32_t aNsID,
|
||||
const nsAString& aLocalName, int32_t aNsID,
|
||||
const nsString& aValue)
|
||||
: txOutputTransaction(eAttributeTransaction),
|
||||
mPrefix(aPrefix),
|
||||
|
@ -208,7 +208,7 @@ txBufferingHandler::attribute(nsIAtom* aPrefix, nsIAtom* aLocalName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txBufferingHandler::attribute(nsIAtom* aPrefix, const nsSubstring& aLocalName,
|
||||
txBufferingHandler::attribute(nsIAtom* aPrefix, const nsAString& aLocalName,
|
||||
const int32_t aNsID, const nsString& aValue)
|
||||
{
|
||||
NS_ENSURE_TRUE(mBuffer, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
@ -224,7 +224,7 @@ txBufferingHandler::attribute(nsIAtom* aPrefix, const nsSubstring& aLocalName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txBufferingHandler::characters(const nsSubstring& aData, bool aDOE)
|
||||
txBufferingHandler::characters(const nsAString& aData, bool aDOE)
|
||||
{
|
||||
NS_ENSURE_TRUE(mBuffer, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
|
@ -320,7 +320,7 @@ txBufferingHandler::startElement(nsIAtom* aPrefix, nsIAtom* aLocalName,
|
|||
|
||||
nsresult
|
||||
txBufferingHandler::startElement(nsIAtom* aPrefix,
|
||||
const nsSubstring& aLocalName,
|
||||
const nsAString& aLocalName,
|
||||
const int32_t aNsID)
|
||||
{
|
||||
NS_ENSURE_TRUE(mBuffer, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
|
|
@ -117,7 +117,7 @@ createDocFragment(txIEvalContext *aContext)
|
|||
}
|
||||
|
||||
static nsresult
|
||||
createAndAddToResult(nsIAtom* aName, const nsSubstring& aValue,
|
||||
createAndAddToResult(nsIAtom* aName, const nsAString& aValue,
|
||||
txNodeSet* aResultSet, nsIContent* aResultHolder)
|
||||
{
|
||||
NS_ASSERTION(aResultHolder->IsNodeOfType(nsINode::eDOCUMENT_FRAGMENT) &&
|
||||
|
|
|
@ -49,7 +49,7 @@ txMozillaTextOutput::attribute(nsIAtom* aPrefix, nsIAtom* aLocalName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txMozillaTextOutput::attribute(nsIAtom* aPrefix, const nsSubstring& aName,
|
||||
txMozillaTextOutput::attribute(nsIAtom* aPrefix, const nsAString& aName,
|
||||
const int32_t aNsID,
|
||||
const nsString& aValue)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ txMozillaTextOutput::attribute(nsIAtom* aPrefix, const nsSubstring& aName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txMozillaTextOutput::characters(const nsSubstring& aData, bool aDOE)
|
||||
txMozillaTextOutput::characters(const nsAString& aData, bool aDOE)
|
||||
{
|
||||
mText.Append(aData);
|
||||
|
||||
|
@ -237,7 +237,7 @@ txMozillaTextOutput::startElement(nsIAtom* aPrefix, nsIAtom* aLocalName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txMozillaTextOutput::startElement(nsIAtom* aPrefix, const nsSubstring& aName,
|
||||
txMozillaTextOutput::startElement(nsIAtom* aPrefix, const nsAString& aName,
|
||||
const int32_t aNsID)
|
||||
{
|
||||
return NS_OK;
|
||||
|
|
|
@ -123,7 +123,7 @@ txMozillaXMLOutput::attribute(nsIAtom* aPrefix,
|
|||
|
||||
nsresult
|
||||
txMozillaXMLOutput::attribute(nsIAtom* aPrefix,
|
||||
const nsSubstring& aLocalName,
|
||||
const nsAString& aLocalName,
|
||||
const int32_t aNsID,
|
||||
const nsString& aValue)
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ txMozillaXMLOutput::attributeInternal(nsIAtom* aPrefix,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txMozillaXMLOutput::characters(const nsSubstring& aData, bool aDOE)
|
||||
txMozillaXMLOutput::characters(const nsAString& aData, bool aDOE)
|
||||
{
|
||||
nsresult rv = closePrevious(false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -454,7 +454,7 @@ txMozillaXMLOutput::startElement(nsIAtom* aPrefix, nsIAtom* aLocalName,
|
|||
|
||||
nsresult
|
||||
txMozillaXMLOutput::startElement(nsIAtom* aPrefix,
|
||||
const nsSubstring& aLocalName,
|
||||
const nsAString& aLocalName,
|
||||
const int32_t aNsID)
|
||||
{
|
||||
int32_t nsId = aNsID;
|
||||
|
@ -777,7 +777,7 @@ void txMozillaXMLOutput::processHTTPEquiv(nsIAtom* aHeader, const nsString& aVal
|
|||
}
|
||||
|
||||
nsresult
|
||||
txMozillaXMLOutput::createResultDocument(const nsSubstring& aName, int32_t aNsID,
|
||||
txMozillaXMLOutput::createResultDocument(const nsAString& aName, int32_t aNsID,
|
||||
nsIDOMDocument* aSourceDocument,
|
||||
bool aLoadedAsData)
|
||||
{
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
|
||||
nsresult closePrevious(bool aFlushText);
|
||||
|
||||
nsresult createResultDocument(const nsSubstring& aName, int32_t aNsID,
|
||||
nsresult createResultDocument(const nsAString& aName, int32_t aNsID,
|
||||
nsIDOMDocument* aSourceDocument,
|
||||
bool aLoadedAsData);
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ txToDocHandlerFactory::createHandlerWith(txOutputFormat* aFormat,
|
|||
|
||||
nsresult
|
||||
txToDocHandlerFactory::createHandlerWith(txOutputFormat* aFormat,
|
||||
const nsSubstring& aName,
|
||||
const nsAString& aName,
|
||||
int32_t aNsID,
|
||||
txAXMLEventHandler** aHandler)
|
||||
{
|
||||
|
@ -224,7 +224,7 @@ txToFragmentHandlerFactory::createHandlerWith(txOutputFormat* aFormat,
|
|||
|
||||
nsresult
|
||||
txToFragmentHandlerFactory::createHandlerWith(txOutputFormat* aFormat,
|
||||
const nsSubstring& aName,
|
||||
const nsAString& aName,
|
||||
int32_t aNsID,
|
||||
txAXMLEventHandler** aHandler)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ txTextHandler::attribute(nsIAtom* aPrefix, nsIAtom* aLocalName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txTextHandler::attribute(nsIAtom* aPrefix, const nsSubstring& aLocalName,
|
||||
txTextHandler::attribute(nsIAtom* aPrefix, const nsAString& aLocalName,
|
||||
const int32_t aNsID,
|
||||
const nsString& aValue)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ txTextHandler::attribute(nsIAtom* aPrefix, const nsSubstring& aLocalName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txTextHandler::characters(const nsSubstring& aData, bool aDOE)
|
||||
txTextHandler::characters(const nsAString& aData, bool aDOE)
|
||||
{
|
||||
if (mLevel == 0)
|
||||
mValue.Append(aData);
|
||||
|
@ -80,7 +80,7 @@ txTextHandler::startElement(nsIAtom* aPrefix, nsIAtom* aLocalName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txTextHandler::startElement(nsIAtom* aPrefix, const nsSubstring& aLocalName,
|
||||
txTextHandler::startElement(nsIAtom* aPrefix, const nsAString& aLocalName,
|
||||
const int32_t aNsID)
|
||||
{
|
||||
if (mOnlyText)
|
||||
|
|
|
@ -38,7 +38,7 @@ txUnknownHandler::attribute(nsIAtom* aPrefix, nsIAtom* aLocalName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txUnknownHandler::attribute(nsIAtom* aPrefix, const nsSubstring& aLocalName,
|
||||
txUnknownHandler::attribute(nsIAtom* aPrefix, const nsAString& aLocalName,
|
||||
const int32_t aNsID, const nsString& aValue)
|
||||
{
|
||||
return mFlushed ?
|
||||
|
@ -47,7 +47,7 @@ txUnknownHandler::attribute(nsIAtom* aPrefix, const nsSubstring& aLocalName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txUnknownHandler::characters(const nsSubstring& aData, bool aDOE)
|
||||
txUnknownHandler::characters(const nsAString& aData, bool aDOE)
|
||||
{
|
||||
return mFlushed ?
|
||||
mEs->mResultHandler->characters(aData, aDOE) :
|
||||
|
@ -147,7 +147,7 @@ txUnknownHandler::startElement(nsIAtom* aPrefix, nsIAtom* aLocalName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
txUnknownHandler::startElement(nsIAtom* aPrefix, const nsSubstring& aLocalName,
|
||||
txUnknownHandler::startElement(nsIAtom* aPrefix, const nsAString& aLocalName,
|
||||
const int32_t aNsID)
|
||||
{
|
||||
if (!mFlushed) {
|
||||
|
@ -167,7 +167,7 @@ txUnknownHandler::startElement(nsIAtom* aPrefix, const nsSubstring& aLocalName,
|
|||
}
|
||||
|
||||
nsresult txUnknownHandler::createHandlerAndFlush(bool aHTMLRoot,
|
||||
const nsSubstring& aName,
|
||||
const nsAString& aName,
|
||||
const int32_t aNsID)
|
||||
{
|
||||
NS_ENSURE_TRUE(mBuffer, NS_ERROR_NOT_INITIALIZED);
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
|
||||
private:
|
||||
nsresult createHandlerAndFlush(bool aHTMLRoot,
|
||||
const nsSubstring& aName,
|
||||
const nsAString& aName,
|
||||
const int32_t aNsID);
|
||||
|
||||
/*
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
* @param aValue the value of the attribute
|
||||
*/
|
||||
virtual nsresult attribute(nsIAtom* aPrefix,
|
||||
const nsSubstring& aLocalName,
|
||||
const nsAString& aLocalName,
|
||||
const int32_t aNsID,
|
||||
const nsString& aValue) = 0;
|
||||
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
* @param aData the characters to receive
|
||||
* @param aDOE disable output escaping for these characters
|
||||
*/
|
||||
virtual nsresult characters(const nsSubstring& aData, bool aDOE) = 0;
|
||||
virtual nsresult characters(const nsAString& aData, bool aDOE) = 0;
|
||||
|
||||
/**
|
||||
* Signals to receive data that should be treated as a comment.
|
||||
|
@ -113,7 +113,7 @@ public:
|
|||
* @param aNsID the namespace ID of the element
|
||||
*/
|
||||
virtual nsresult startElement(nsIAtom* aPrefix,
|
||||
const nsSubstring& aLocalName,
|
||||
const nsAString& aLocalName,
|
||||
const int32_t aNsID) = 0;
|
||||
};
|
||||
|
||||
|
@ -122,10 +122,10 @@ public:
|
|||
nsIAtom* aLowercaseLocalName, int32_t aNsID, \
|
||||
const nsString& aValue); \
|
||||
virtual nsresult attribute(nsIAtom* aPrefix, \
|
||||
const nsSubstring& aLocalName, \
|
||||
const nsAString& aLocalName, \
|
||||
const int32_t aNsID, \
|
||||
const nsString& aValue); \
|
||||
virtual nsresult characters(const nsSubstring& aData, bool aDOE); \
|
||||
virtual nsresult characters(const nsAString& aData, bool aDOE); \
|
||||
virtual nsresult comment(const nsString& aData); \
|
||||
virtual nsresult endDocument(nsresult aResult = NS_OK); \
|
||||
virtual nsresult endElement(); \
|
||||
|
@ -137,7 +137,7 @@ public:
|
|||
nsIAtom* aLowercaseLocalName, \
|
||||
int32_t aNsID); \
|
||||
virtual nsresult startElement(nsIAtom* aPrefix, \
|
||||
const nsSubstring& aName, \
|
||||
const nsAString& aName, \
|
||||
const int32_t aNsID);
|
||||
|
||||
|
||||
|
@ -182,7 +182,7 @@ public:
|
|||
*/
|
||||
virtual nsresult
|
||||
createHandlerWith(txOutputFormat* aFormat,
|
||||
const nsSubstring& aName,
|
||||
const nsAString& aName,
|
||||
int32_t aNsID,
|
||||
txAXMLEventHandler** aHandler) = 0;
|
||||
};
|
||||
|
@ -191,7 +191,7 @@ public:
|
|||
nsresult createHandlerWith(txOutputFormat* aFormat, \
|
||||
txAXMLEventHandler** aHandler); \
|
||||
nsresult createHandlerWith(txOutputFormat* aFormat, \
|
||||
const nsSubstring& aName, \
|
||||
const nsAString& aName, \
|
||||
int32_t aNsID, \
|
||||
txAXMLEventHandler** aHandler);
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ txRootPattern::toString(nsAString& aDest)
|
|||
* This looks like the id() function, but may only have LITERALs as
|
||||
* argument.
|
||||
*/
|
||||
txIdPattern::txIdPattern(const nsSubstring& aString)
|
||||
txIdPattern::txIdPattern(const nsAString& aString)
|
||||
{
|
||||
nsWhitespaceTokenizer tokenizer(aString);
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
|
|
|
@ -188,7 +188,7 @@ private:
|
|||
class txIdPattern : public txPattern
|
||||
{
|
||||
public:
|
||||
explicit txIdPattern(const nsSubstring& aString);
|
||||
explicit txIdPattern(const nsAString& aString);
|
||||
|
||||
TX_DECL_PATTERN;
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ nsContentBlocker::TestPermission(nsIURI *aCurrentURI,
|
|||
|
||||
// Get the domain, ie the last part of the host (www.domain.com -> domain.com)
|
||||
// This will break on co.uk
|
||||
const nsCSubstring &tail =
|
||||
const nsACString& tail =
|
||||
Substring(currentHost, dot, currentHost.Length() - dot);
|
||||
|
||||
nsAutoCString firstHost;
|
||||
|
@ -360,7 +360,7 @@ nsContentBlocker::TestPermission(nsIURI *aCurrentURI,
|
|||
}
|
||||
|
||||
// Get the last part of the firstUri with the same length as |tail|
|
||||
const nsCSubstring &firstTail =
|
||||
const nsACString& firstTail =
|
||||
Substring(firstHost, firstHost.Length() - tail.Length(), tail.Length());
|
||||
|
||||
// Check that both tails are the same, and that just before the tail in
|
||||
|
|
|
@ -269,7 +269,7 @@ mozInlineSpellWordUtil::GetRangeForWord(nsIDOMNode* aWordNode,
|
|||
|
||||
// This is to fix characters that the spellchecker may not like
|
||||
static void
|
||||
NormalizeWord(const nsSubstring& aInput, int32_t aPos, int32_t aLen, nsAString& aOutput)
|
||||
NormalizeWord(const nsAString& aInput, int32_t aPos, int32_t aLen, nsAString& aOutput)
|
||||
{
|
||||
aOutput.Truncate();
|
||||
for (int32_t i = 0; i < aLen; i++) {
|
||||
|
@ -736,7 +736,7 @@ CheckLeavingBreakElement(nsINode* aNode, void* aClosure)
|
|||
}
|
||||
|
||||
void
|
||||
mozInlineSpellWordUtil::NormalizeWord(nsSubstring& aWord)
|
||||
mozInlineSpellWordUtil::NormalizeWord(nsAString& aWord)
|
||||
{
|
||||
nsAutoString result;
|
||||
::NormalizeWord(aWord, 0, aWord.Length(), result);
|
||||
|
|
|
@ -90,7 +90,7 @@ public:
|
|||
|
||||
// Call to normalize some punctuation. This function takes an autostring
|
||||
// so we can access characters directly.
|
||||
static void NormalizeWord(nsSubstring& aWord);
|
||||
static void NormalizeWord(nsAString& aWord);
|
||||
|
||||
nsIDOMDocument* GetDOMDocument() const { return mDOMDocument; }
|
||||
nsIDocument* GetDocument() const { return mDocument; }
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "gfxFontVariations.h"
|
||||
#include "mozilla/RefPtr.h" // for RefPtr
|
||||
#include "nsCoord.h" // for nscoord
|
||||
#include "nsStringFwd.h" // for nsSubstring
|
||||
#include "nsStringFwd.h" // for nsAString
|
||||
#include "nsString.h" // for nsString
|
||||
#include "nsTArray.h" // for nsTArray
|
||||
|
||||
|
|
|
@ -701,7 +701,7 @@ LocaleService::Locale::Locale(const nsCString& aLocale, bool aRange)
|
|||
nsAutoCString normLocale(aLocale);
|
||||
normLocale.ReplaceChar('_', '-');
|
||||
|
||||
for (const nsCSubstring& part : normLocale.Split('-')) {
|
||||
for (const nsACString& part : normLocale.Split('-')) {
|
||||
switch (partNum) {
|
||||
case 0:
|
||||
if (part.EqualsLiteral("*") ||
|
||||
|
|
|
@ -236,7 +236,7 @@ nsCounterManager::AddResetOrIncrement(nsIFrame* aFrame, int32_t aIndex,
|
|||
}
|
||||
|
||||
nsCounterList*
|
||||
nsCounterManager::CounterListFor(const nsSubstring& aCounterName)
|
||||
nsCounterManager::CounterListFor(const nsAString& aCounterName)
|
||||
{
|
||||
return mNames.LookupForAdd(aCounterName).OrInsert([]() {
|
||||
return new nsCounterList();
|
||||
|
|
|
@ -212,7 +212,7 @@ public:
|
|||
|
||||
// Gets the appropriate counter list, creating it if necessary.
|
||||
// Guaranteed to return non-null. (Uses an infallible hashtable API.)
|
||||
nsCounterList* CounterListFor(const nsSubstring& aCounterName);
|
||||
nsCounterList* CounterListFor(const nsAString& aCounterName);
|
||||
|
||||
// Clean up data in any dirty counter lists.
|
||||
void RecalcAll();
|
||||
|
|
|
@ -2180,7 +2180,7 @@ struct MOZ_STACK_CLASS nsGridContainerFrame::Grid
|
|||
* @return null if not found
|
||||
*/
|
||||
static const css::GridNamedArea*
|
||||
FindNamedArea(const nsSubstring& aName, const nsStylePosition* aStyle)
|
||||
FindNamedArea(const nsAString& aName, const nsStylePosition* aStyle)
|
||||
{
|
||||
if (!aStyle->mGridTemplateAreas) {
|
||||
return nullptr;
|
||||
|
|
|
@ -52,7 +52,7 @@ struct PadType
|
|||
|
||||
static bool
|
||||
GetCyclicCounterText(CounterValue aOrdinal,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
const nsTArray<nsString>& aSymbols)
|
||||
{
|
||||
MOZ_ASSERT(aSymbols.Length() >= 1,
|
||||
|
@ -65,7 +65,7 @@ GetCyclicCounterText(CounterValue aOrdinal,
|
|||
|
||||
static bool
|
||||
GetFixedCounterText(CounterValue aOrdinal,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
CounterValue aStart,
|
||||
const nsTArray<nsString>& aSymbols)
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ GetFixedCounterText(CounterValue aOrdinal,
|
|||
|
||||
static bool
|
||||
GetSymbolicCounterText(CounterValue aOrdinal,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
const nsTArray<nsString>& aSymbols)
|
||||
{
|
||||
MOZ_ASSERT(aSymbols.Length() >= 1,
|
||||
|
@ -109,7 +109,7 @@ GetSymbolicCounterText(CounterValue aOrdinal,
|
|||
|
||||
static bool
|
||||
GetAlphabeticCounterText(CounterValue aOrdinal,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
const nsTArray<nsString>& aSymbols)
|
||||
{
|
||||
MOZ_ASSERT(aSymbols.Length() >= 2,
|
||||
|
@ -139,7 +139,7 @@ GetAlphabeticCounterText(CounterValue aOrdinal,
|
|||
|
||||
static bool
|
||||
GetNumericCounterText(CounterValue aOrdinal,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
const nsTArray<nsString>& aSymbols)
|
||||
{
|
||||
MOZ_ASSERT(aSymbols.Length() >= 2,
|
||||
|
@ -167,7 +167,7 @@ GetNumericCounterText(CounterValue aOrdinal,
|
|||
|
||||
static bool
|
||||
GetAdditiveCounterText(CounterValue aOrdinal,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
const nsTArray<AdditiveSymbol>& aSymbols)
|
||||
{
|
||||
MOZ_ASSERT(aOrdinal >= 0, "Invalid ordinal.");
|
||||
|
@ -209,7 +209,7 @@ GetAdditiveCounterText(CounterValue aOrdinal,
|
|||
}
|
||||
|
||||
static bool
|
||||
DecimalToText(CounterValue aOrdinal, nsSubstring& aResult)
|
||||
DecimalToText(CounterValue aOrdinal, nsAString& aResult)
|
||||
{
|
||||
aResult.AppendInt(aOrdinal);
|
||||
return true;
|
||||
|
@ -324,7 +324,7 @@ static const CJKIdeographicData gDataTradChineseFormal = {
|
|||
};
|
||||
|
||||
static bool
|
||||
CJKIdeographicToText(CounterValue aOrdinal, nsSubstring& aResult,
|
||||
CJKIdeographicToText(CounterValue aOrdinal, nsAString& aResult,
|
||||
const CJKIdeographicData& data)
|
||||
{
|
||||
NS_ASSERTION(aOrdinal >= 0, "Only accept non-negative ordinal");
|
||||
|
@ -407,7 +407,7 @@ static const char16_t gHebrewDigit[22] =
|
|||
};
|
||||
|
||||
static bool
|
||||
HebrewToText(CounterValue aOrdinal, nsSubstring& aResult)
|
||||
HebrewToText(CounterValue aOrdinal, nsAString& aResult)
|
||||
{
|
||||
if (aOrdinal < 1 || aOrdinal > 999999) {
|
||||
return false;
|
||||
|
@ -476,7 +476,7 @@ HebrewToText(CounterValue aOrdinal, nsSubstring& aResult)
|
|||
#define ETHIOPIC_TEN_THOUSAND 0x137C
|
||||
|
||||
static bool
|
||||
EthiopicToText(CounterValue aOrdinal, nsSubstring& aResult)
|
||||
EthiopicToText(CounterValue aOrdinal, nsAString& aResult)
|
||||
{
|
||||
if (aOrdinal < 1) {
|
||||
return false;
|
||||
|
@ -590,12 +590,12 @@ protected:
|
|||
}
|
||||
|
||||
public:
|
||||
virtual void GetStyleName(nsSubstring& aResult) override;
|
||||
virtual void GetPrefix(nsSubstring& aResult) override;
|
||||
virtual void GetSuffix(nsSubstring& aResult) override;
|
||||
virtual void GetStyleName(nsAString& aResult) override;
|
||||
virtual void GetPrefix(nsAString& aResult) override;
|
||||
virtual void GetSuffix(nsAString& aResult) override;
|
||||
virtual void GetSpokenCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsBullet) override;
|
||||
virtual bool IsBullet() override;
|
||||
|
||||
|
@ -609,12 +609,12 @@ public:
|
|||
|
||||
virtual bool GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL) override;
|
||||
};
|
||||
|
||||
/* virtual */ void
|
||||
BuiltinCounterStyle::GetStyleName(nsSubstring& aResult)
|
||||
BuiltinCounterStyle::GetStyleName(nsAString& aResult)
|
||||
{
|
||||
MOZ_ASSERT(mStyle != NS_STYLE_LIST_STYLE_CUSTOM);
|
||||
const nsCString& str =
|
||||
|
@ -624,13 +624,13 @@ BuiltinCounterStyle::GetStyleName(nsSubstring& aResult)
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
BuiltinCounterStyle::GetPrefix(nsSubstring& aResult)
|
||||
BuiltinCounterStyle::GetPrefix(nsAString& aResult)
|
||||
{
|
||||
aResult.Truncate();
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
BuiltinCounterStyle::GetSuffix(nsSubstring& aResult)
|
||||
BuiltinCounterStyle::GetSuffix(nsAString& aResult)
|
||||
{
|
||||
switch (mStyle) {
|
||||
case NS_STYLE_LIST_STYLE_NONE:
|
||||
|
@ -677,7 +677,7 @@ static const char16_t kDownPointingCharacter = 0x25be;
|
|||
/* virtual */ void
|
||||
BuiltinCounterStyle::GetSpokenCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsBullet)
|
||||
{
|
||||
switch (mStyle) {
|
||||
|
@ -883,7 +883,7 @@ BuiltinCounterStyle::UseNegativeSign()
|
|||
/* virtual */ bool
|
||||
BuiltinCounterStyle::GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL)
|
||||
{
|
||||
aIsRTL = false;
|
||||
|
@ -1047,12 +1047,12 @@ public:
|
|||
nsCSSCounterStyleRule* GetRule() const { return mRule; }
|
||||
uint32_t GetRuleGeneration() const { return mRuleGeneration; }
|
||||
|
||||
virtual void GetStyleName(nsSubstring& aResult) override;
|
||||
virtual void GetPrefix(nsSubstring& aResult) override;
|
||||
virtual void GetSuffix(nsSubstring& aResult) override;
|
||||
virtual void GetStyleName(nsAString& aResult) override;
|
||||
virtual void GetPrefix(nsAString& aResult) override;
|
||||
virtual void GetSuffix(nsAString& aResult) override;
|
||||
virtual void GetSpokenCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsBullet) override;
|
||||
virtual bool IsBullet() override;
|
||||
|
||||
|
@ -1066,11 +1066,11 @@ public:
|
|||
|
||||
virtual void CallFallbackStyle(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL) override;
|
||||
virtual bool GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL) override;
|
||||
|
||||
bool IsExtendsSystem()
|
||||
|
@ -1205,14 +1205,14 @@ CustomCounterStyle::ResetDependentData()
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
CustomCounterStyle::GetStyleName(nsSubstring& aResult)
|
||||
CustomCounterStyle::GetStyleName(nsAString& aResult)
|
||||
{
|
||||
nsDependentAtomString name(mName);
|
||||
aResult.Assign(name);
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
CustomCounterStyle::GetPrefix(nsSubstring& aResult)
|
||||
CustomCounterStyle::GetPrefix(nsAString& aResult)
|
||||
{
|
||||
if (!(mFlags & FLAG_PREFIX_INITED)) {
|
||||
mFlags |= FLAG_PREFIX_INITED;
|
||||
|
@ -1230,7 +1230,7 @@ CustomCounterStyle::GetPrefix(nsSubstring& aResult)
|
|||
}
|
||||
|
||||
/* virtual */ void
|
||||
CustomCounterStyle::GetSuffix(nsSubstring& aResult)
|
||||
CustomCounterStyle::GetSuffix(nsAString& aResult)
|
||||
{
|
||||
if (!(mFlags & FLAG_SUFFIX_INITED)) {
|
||||
mFlags |= FLAG_SUFFIX_INITED;
|
||||
|
@ -1250,7 +1250,7 @@ CustomCounterStyle::GetSuffix(nsSubstring& aResult)
|
|||
/* virtual */ void
|
||||
CustomCounterStyle::GetSpokenCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsBullet)
|
||||
{
|
||||
if (GetSpeakAs() != NS_STYLE_COUNTER_SPEAKAS_OTHER) {
|
||||
|
@ -1421,7 +1421,7 @@ CustomCounterStyle::UseNegativeSign()
|
|||
/* virtual */ void
|
||||
CustomCounterStyle::CallFallbackStyle(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL)
|
||||
{
|
||||
CounterStyle* fallback = GetFallback();
|
||||
|
@ -1435,7 +1435,7 @@ CustomCounterStyle::CallFallbackStyle(CounterValue aOrdinal,
|
|||
/* virtual */ bool
|
||||
CustomCounterStyle::GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL)
|
||||
{
|
||||
switch (mSystem) {
|
||||
|
@ -1692,7 +1692,7 @@ CustomCounterStyle::GetExtendsRoot()
|
|||
return mExtendsRoot;
|
||||
}
|
||||
|
||||
AnonymousCounterStyle::AnonymousCounterStyle(const nsSubstring& aContent)
|
||||
AnonymousCounterStyle::AnonymousCounterStyle(const nsAString& aContent)
|
||||
: CounterStyle(NS_STYLE_LIST_STYLE_CUSTOM)
|
||||
, mSingleString(true)
|
||||
, mSystem(NS_STYLE_COUNTER_SYSTEM_CYCLIC)
|
||||
|
@ -1867,7 +1867,7 @@ CounterStyle::IsDependentStyle() const
|
|||
void
|
||||
CounterStyle::GetCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL)
|
||||
{
|
||||
bool success = IsOrdinalInRange(aOrdinal);
|
||||
|
@ -1931,7 +1931,7 @@ CounterStyle::GetCounterText(CounterValue aOrdinal,
|
|||
/* virtual */ void
|
||||
CounterStyle::GetSpokenCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsBullet)
|
||||
{
|
||||
bool isRTL; // we don't care about direction for spoken text
|
||||
|
|
|
@ -52,16 +52,16 @@ public:
|
|||
// styles are dependent for fallback.
|
||||
bool IsDependentStyle() const;
|
||||
|
||||
virtual void GetStyleName(nsSubstring& aResult) = 0;
|
||||
virtual void GetPrefix(nsSubstring& aResult) = 0;
|
||||
virtual void GetSuffix(nsSubstring& aResult) = 0;
|
||||
virtual void GetStyleName(nsAString& aResult) = 0;
|
||||
virtual void GetPrefix(nsAString& aResult) = 0;
|
||||
virtual void GetSuffix(nsAString& aResult) = 0;
|
||||
void GetCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL);
|
||||
virtual void GetSpokenCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsBullet);
|
||||
|
||||
// XXX This method could be removed once ::-moz-list-bullet and
|
||||
|
@ -88,11 +88,11 @@ public:
|
|||
|
||||
virtual void CallFallbackStyle(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL);
|
||||
virtual bool GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL) = 0;
|
||||
|
||||
virtual AnonymousCounterStyle* AsAnonymous() { return nullptr; }
|
||||
|
@ -104,7 +104,7 @@ protected:
|
|||
class AnonymousCounterStyle final : public CounterStyle
|
||||
{
|
||||
public:
|
||||
explicit AnonymousCounterStyle(const nsSubstring& aContent);
|
||||
explicit AnonymousCounterStyle(const nsAString& aContent);
|
||||
AnonymousCounterStyle(uint8_t aSystem, nsTArray<nsString> aSymbols);
|
||||
explicit AnonymousCounterStyle(const nsCSSValue::Array* aValue);
|
||||
|
||||
|
@ -123,7 +123,7 @@ public:
|
|||
|
||||
virtual bool GetInitialCounterText(CounterValue aOrdinal,
|
||||
WritingMode aWritingMode,
|
||||
nsSubstring& aResult,
|
||||
nsAString& aResult,
|
||||
bool& aIsRTL) override;
|
||||
|
||||
virtual AnonymousCounterStyle* AsAnonymous() override { return this; }
|
||||
|
|
|
@ -126,7 +126,7 @@ protected:
|
|||
public:
|
||||
// Data for loading a sheet linked from a document
|
||||
SheetLoadData(Loader* aLoader,
|
||||
const nsSubstring& aTitle,
|
||||
const nsAString& aTitle,
|
||||
nsIURI* aURI,
|
||||
StyleSheet* aSheet,
|
||||
nsIStyleSheetLinkingElement* aOwningElement,
|
||||
|
@ -302,7 +302,7 @@ NS_IMPL_ISUPPORTS(SheetLoadData, nsIUnicharStreamLoaderObserver, nsIRunnable,
|
|||
nsIThreadObserver)
|
||||
|
||||
SheetLoadData::SheetLoadData(Loader* aLoader,
|
||||
const nsSubstring& aTitle,
|
||||
const nsAString& aTitle,
|
||||
nsIURI* aURI,
|
||||
StyleSheet* aSheet,
|
||||
nsIStyleSheetLinkingElement* aOwningElement,
|
||||
|
@ -1285,8 +1285,8 @@ Loader::CreateSheet(nsIURI* aURI,
|
|||
*/
|
||||
void
|
||||
Loader::PrepareSheet(StyleSheet* aSheet,
|
||||
const nsSubstring& aTitle,
|
||||
const nsSubstring& aMediaString,
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aMediaString,
|
||||
MediaList* aMediaList,
|
||||
Element* aScopeElement,
|
||||
bool aIsAlternate)
|
||||
|
@ -2281,7 +2281,7 @@ Loader::LoadChildSheet(StyleSheet* aParentSheet,
|
|||
state = eSheetComplete;
|
||||
} else {
|
||||
bool isAlternate;
|
||||
const nsSubstring& empty = EmptyString();
|
||||
const nsAString& empty = EmptyString();
|
||||
// For now, use CORS_NONE for child sheets
|
||||
rv = CreateSheet(aURL, nullptr, principal,
|
||||
aParentSheet->ParsingMode(),
|
||||
|
@ -2421,7 +2421,7 @@ Loader::InternalLoadNonDocumentSheet(nsIURI* aURL,
|
|||
bool isAlternate;
|
||||
RefPtr<StyleSheet> sheet;
|
||||
bool syncLoad = (aObserver == nullptr);
|
||||
const nsSubstring& empty = EmptyString();
|
||||
const nsAString& empty = EmptyString();
|
||||
|
||||
rv = CreateSheet(aURL, nullptr, aOriginPrincipal, aParsingMode,
|
||||
aCORSMode, aReferrerPolicy, aIntegrity, syncLoad,
|
||||
|
|
|
@ -41,7 +41,7 @@ struct AnimationEventInfo {
|
|||
AnimationEventInfo(dom::Element* aElement,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
EventMessage aMessage,
|
||||
const nsSubstring& aAnimationName,
|
||||
const nsAString& aAnimationName,
|
||||
const StickyTimeDuration& aElapsedTime,
|
||||
const TimeStamp& aTimeStamp,
|
||||
dom::Animation* aAnimation)
|
||||
|
@ -76,7 +76,7 @@ class CSSAnimation final : public Animation
|
|||
{
|
||||
public:
|
||||
explicit CSSAnimation(nsIGlobalObject* aGlobal,
|
||||
const nsSubstring& aAnimationName)
|
||||
const nsAString& aAnimationName)
|
||||
: dom::Animation(aGlobal)
|
||||
, mAnimationName(aAnimationName)
|
||||
, mIsStylePaused(false)
|
||||
|
|
|
@ -202,7 +202,7 @@ public:
|
|||
bool aDisallowRelativeValues,
|
||||
nsCSSValue& aResult);
|
||||
|
||||
void ParseMediaList(const nsSubstring& aBuffer,
|
||||
void ParseMediaList(const nsAString& aBuffer,
|
||||
nsIURI* aURL, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
nsMediaList* aMediaList);
|
||||
|
@ -222,34 +222,34 @@ public:
|
|||
bool* aChanged,
|
||||
bool aIsImportant);
|
||||
|
||||
bool ParseFontFamilyListString(const nsSubstring& aBuffer,
|
||||
bool ParseFontFamilyListString(const nsAString& aBuffer,
|
||||
nsIURI* aURL, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
nsCSSValue& aValue);
|
||||
|
||||
bool ParseColorString(const nsSubstring& aBuffer,
|
||||
bool ParseColorString(const nsAString& aBuffer,
|
||||
nsIURI* aURL, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
nsCSSValue& aValue,
|
||||
bool aSuppressErrors /* false */);
|
||||
|
||||
bool ParseMarginString(const nsSubstring& aBuffer,
|
||||
bool ParseMarginString(const nsAString& aBuffer,
|
||||
nsIURI* aURL, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
nsCSSValue& aValue,
|
||||
bool aSuppressErrors /* false */);
|
||||
|
||||
nsresult ParseSelectorString(const nsSubstring& aSelectorString,
|
||||
nsresult ParseSelectorString(const nsAString& aSelectorString,
|
||||
nsIURI* aURL, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
nsCSSSelectorList **aSelectorList);
|
||||
|
||||
already_AddRefed<nsCSSKeyframeRule>
|
||||
ParseKeyframeRule(const nsSubstring& aBuffer,
|
||||
ParseKeyframeRule(const nsAString& aBuffer,
|
||||
nsIURI* aURL,
|
||||
uint32_t aLineNumber);
|
||||
|
||||
bool ParseKeyframeSelectorString(const nsSubstring& aSelectorString,
|
||||
bool ParseKeyframeSelectorString(const nsAString& aSelectorString,
|
||||
nsIURI* aURL, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
InfallibleTArray<float>& aSelectorList);
|
||||
|
@ -532,7 +532,7 @@ protected:
|
|||
bool ExpectSymbol(char16_t aSymbol, bool aSkipWS);
|
||||
bool ExpectEndProperty();
|
||||
bool CheckEndProperty();
|
||||
nsSubstring* NextIdent();
|
||||
nsAString* NextIdent();
|
||||
|
||||
// returns true when the stop symbol is found, and false for EOF
|
||||
bool SkipUntil(char16_t aStopSymbol);
|
||||
|
@ -1998,7 +1998,7 @@ CSSParserImpl::ParseVariable(const nsAString& aVariableName,
|
|||
}
|
||||
|
||||
void
|
||||
CSSParserImpl::ParseMediaList(const nsSubstring& aBuffer,
|
||||
CSSParserImpl::ParseMediaList(const nsAString& aBuffer,
|
||||
nsIURI* aURI, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
nsMediaList* aMediaList)
|
||||
|
@ -2111,7 +2111,7 @@ CSSParserImpl::ParseSourceSizeList(const nsAString& aBuffer,
|
|||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseColorString(const nsSubstring& aBuffer,
|
||||
CSSParserImpl::ParseColorString(const nsAString& aBuffer,
|
||||
nsIURI* aURI, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
nsCSSValue& aValue,
|
||||
|
@ -2138,7 +2138,7 @@ CSSParserImpl::ParseColorString(const nsSubstring& aBuffer,
|
|||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseMarginString(const nsSubstring& aBuffer,
|
||||
CSSParserImpl::ParseMarginString(const nsAString& aBuffer,
|
||||
nsIURI* aURI, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
nsCSSValue& aValue,
|
||||
|
@ -2164,7 +2164,7 @@ CSSParserImpl::ParseMarginString(const nsSubstring& aBuffer,
|
|||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseFontFamilyListString(const nsSubstring& aBuffer,
|
||||
CSSParserImpl::ParseFontFamilyListString(const nsAString& aBuffer,
|
||||
nsIURI* aURI, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
nsCSSValue& aValue)
|
||||
|
@ -2181,7 +2181,7 @@ CSSParserImpl::ParseFontFamilyListString(const nsSubstring& aBuffer,
|
|||
}
|
||||
|
||||
nsresult
|
||||
CSSParserImpl::ParseSelectorString(const nsSubstring& aSelectorString,
|
||||
CSSParserImpl::ParseSelectorString(const nsAString& aSelectorString,
|
||||
nsIURI* aURI, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
nsCSSSelectorList **aSelectorList)
|
||||
|
@ -2215,7 +2215,7 @@ CSSParserImpl::ParseSelectorString(const nsSubstring& aSelectorString,
|
|||
|
||||
|
||||
already_AddRefed<nsCSSKeyframeRule>
|
||||
CSSParserImpl::ParseKeyframeRule(const nsSubstring& aBuffer,
|
||||
CSSParserImpl::ParseKeyframeRule(const nsAString& aBuffer,
|
||||
nsIURI* aURI,
|
||||
uint32_t aLineNumber)
|
||||
{
|
||||
|
@ -2236,7 +2236,7 @@ CSSParserImpl::ParseKeyframeRule(const nsSubstring& aBuffer,
|
|||
}
|
||||
|
||||
bool
|
||||
CSSParserImpl::ParseKeyframeSelectorString(const nsSubstring& aSelectorString,
|
||||
CSSParserImpl::ParseKeyframeSelectorString(const nsAString& aSelectorString,
|
||||
nsIURI* aURI, // for error reporting
|
||||
uint32_t aLineNumber, // for error reporting
|
||||
InfallibleTArray<float>& aSelectorList)
|
||||
|
@ -3128,7 +3128,7 @@ CSSParserImpl::ParsePriority()
|
|||
return ePriority_Important;
|
||||
}
|
||||
|
||||
nsSubstring*
|
||||
nsAString*
|
||||
CSSParserImpl::NextIdent()
|
||||
{
|
||||
// XXX Error reporting?
|
||||
|
@ -7294,7 +7294,7 @@ bool
|
|||
CSSParserImpl::ParseEnum(nsCSSValue& aValue,
|
||||
const KTableEntry aKeywordTable[])
|
||||
{
|
||||
nsSubstring* ident = NextIdent();
|
||||
nsAString* ident = NextIdent();
|
||||
if (nullptr == ident) {
|
||||
return false;
|
||||
}
|
||||
|
@ -7318,7 +7318,7 @@ CSSParserImpl::ParseAlignEnum(nsCSSValue& aValue,
|
|||
aKeywordTable) !=
|
||||
eCSSKeyword_UNKNOWN,
|
||||
"Please use ParseEnum instead");
|
||||
nsSubstring* ident = NextIdent();
|
||||
nsAString* ident = NextIdent();
|
||||
if (!ident) {
|
||||
return false;
|
||||
}
|
||||
|
@ -9127,7 +9127,7 @@ CSSParserImpl::ParseGridTemplateColumnsRows(nsCSSPropertyID aPropID)
|
|||
return true;
|
||||
}
|
||||
|
||||
nsSubstring* ident = NextIdent();
|
||||
nsAString* ident = NextIdent();
|
||||
if (ident) {
|
||||
if (ident->LowerCaseEqualsLiteral("subgrid")) {
|
||||
if (!nsLayoutUtils::IsGridTemplateSubgridValueEnabled()) {
|
||||
|
@ -9315,7 +9315,7 @@ CSSParserImpl::ParseGridTemplate(bool aForGridShorthand)
|
|||
|
||||
// 'subgrid' can appear either by itself,
|
||||
// or as the beginning of <'grid-template-rows'> / <'grid-template-columns'>
|
||||
nsSubstring* ident = NextIdent();
|
||||
nsAString* ident = NextIdent();
|
||||
if (ident) {
|
||||
if (ident->LowerCaseEqualsLiteral("subgrid")) {
|
||||
if (!nsLayoutUtils::IsGridTemplateSubgridValueEnabled()) {
|
||||
|
@ -17992,7 +17992,7 @@ nsCSSParser::ParseVariable(const nsAString& aVariableName,
|
|||
}
|
||||
|
||||
void
|
||||
nsCSSParser::ParseMediaList(const nsSubstring& aBuffer,
|
||||
nsCSSParser::ParseMediaList(const nsAString& aBuffer,
|
||||
nsIURI* aURI,
|
||||
uint32_t aLineNumber,
|
||||
nsMediaList* aMediaList)
|
||||
|
@ -18013,7 +18013,7 @@ nsCSSParser::ParseSourceSizeList(const nsAString& aBuffer,
|
|||
}
|
||||
|
||||
bool
|
||||
nsCSSParser::ParseFontFamilyListString(const nsSubstring& aBuffer,
|
||||
nsCSSParser::ParseFontFamilyListString(const nsAString& aBuffer,
|
||||
nsIURI* aURI,
|
||||
uint32_t aLineNumber,
|
||||
nsCSSValue& aValue)
|
||||
|
@ -18023,7 +18023,7 @@ nsCSSParser::ParseFontFamilyListString(const nsSubstring& aBuffer,
|
|||
}
|
||||
|
||||
bool
|
||||
nsCSSParser::ParseColorString(const nsSubstring& aBuffer,
|
||||
nsCSSParser::ParseColorString(const nsAString& aBuffer,
|
||||
nsIURI* aURI,
|
||||
uint32_t aLineNumber,
|
||||
nsCSSValue& aValue,
|
||||
|
@ -18034,7 +18034,7 @@ nsCSSParser::ParseColorString(const nsSubstring& aBuffer,
|
|||
}
|
||||
|
||||
bool
|
||||
nsCSSParser::ParseMarginString(const nsSubstring& aBuffer,
|
||||
nsCSSParser::ParseMarginString(const nsAString& aBuffer,
|
||||
nsIURI* aURI,
|
||||
uint32_t aLineNumber,
|
||||
nsCSSValue& aValue,
|
||||
|
@ -18045,7 +18045,7 @@ nsCSSParser::ParseMarginString(const nsSubstring& aBuffer,
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsCSSParser::ParseSelectorString(const nsSubstring& aSelectorString,
|
||||
nsCSSParser::ParseSelectorString(const nsAString& aSelectorString,
|
||||
nsIURI* aURI,
|
||||
uint32_t aLineNumber,
|
||||
nsCSSSelectorList** aSelectorList)
|
||||
|
@ -18055,7 +18055,7 @@ nsCSSParser::ParseSelectorString(const nsSubstring& aSelectorString,
|
|||
}
|
||||
|
||||
already_AddRefed<nsCSSKeyframeRule>
|
||||
nsCSSParser::ParseKeyframeRule(const nsSubstring& aBuffer,
|
||||
nsCSSParser::ParseKeyframeRule(const nsAString& aBuffer,
|
||||
nsIURI* aURI,
|
||||
uint32_t aLineNumber)
|
||||
{
|
||||
|
@ -18064,7 +18064,7 @@ nsCSSParser::ParseKeyframeRule(const nsSubstring& aBuffer,
|
|||
}
|
||||
|
||||
bool
|
||||
nsCSSParser::ParseKeyframeSelectorString(const nsSubstring& aSelectorString,
|
||||
nsCSSParser::ParseKeyframeSelectorString(const nsAString& aSelectorString,
|
||||
nsIURI* aURI,
|
||||
uint32_t aLineNumber,
|
||||
InfallibleTArray<float>& aSelectorList)
|
||||
|
|
|
@ -162,7 +162,7 @@ public:
|
|||
* replacing its current contents. |aURL| and |aLineNumber| are used for error
|
||||
* reporting.
|
||||
*/
|
||||
void ParseMediaList(const nsSubstring& aBuffer,
|
||||
void ParseMediaList(const nsAString& aBuffer,
|
||||
nsIURI* aURL,
|
||||
uint32_t aLineNumber,
|
||||
nsMediaList* aMediaList);
|
||||
|
@ -189,7 +189,7 @@ public:
|
|||
* Parse aBuffer into a nsCSSValue |aValue|. Will return false
|
||||
* if aBuffer is not a valid font family list.
|
||||
*/
|
||||
bool ParseFontFamilyListString(const nsSubstring& aBuffer,
|
||||
bool ParseFontFamilyListString(const nsAString& aBuffer,
|
||||
nsIURI* aURL,
|
||||
uint32_t aLineNumber,
|
||||
nsCSSValue& aValue);
|
||||
|
@ -200,7 +200,7 @@ public:
|
|||
* One can use nsRuleNode::ComputeColor to compute an nscolor from
|
||||
* the returned nsCSSValue.
|
||||
*/
|
||||
bool ParseColorString(const nsSubstring& aBuffer,
|
||||
bool ParseColorString(const nsAString& aBuffer,
|
||||
nsIURI* aURL,
|
||||
uint32_t aLineNumber,
|
||||
nsCSSValue& aValue,
|
||||
|
@ -212,7 +212,7 @@ public:
|
|||
* One can use nsRuleNode::GetRectValue to compute an nsCSSRect from
|
||||
* the returned nsCSSValue.
|
||||
*/
|
||||
bool ParseMarginString(const nsSubstring& aBuffer,
|
||||
bool ParseMarginString(const nsAString& aBuffer,
|
||||
nsIURI* aURL,
|
||||
uint32_t aLineNumber,
|
||||
nsCSSValue& aValue,
|
||||
|
@ -222,7 +222,7 @@ public:
|
|||
* Parse aBuffer into a selector list. On success, caller must
|
||||
* delete *aSelectorList when done with it.
|
||||
*/
|
||||
nsresult ParseSelectorString(const nsSubstring& aSelectorString,
|
||||
nsresult ParseSelectorString(const nsAString& aSelectorString,
|
||||
nsIURI* aURL,
|
||||
uint32_t aLineNumber,
|
||||
nsCSSSelectorList** aSelectorList);
|
||||
|
@ -232,7 +232,7 @@ public:
|
|||
* Return it if the parse was successful.
|
||||
*/
|
||||
already_AddRefed<nsCSSKeyframeRule>
|
||||
ParseKeyframeRule(const nsSubstring& aBuffer,
|
||||
ParseKeyframeRule(const nsAString& aBuffer,
|
||||
nsIURI* aURL,
|
||||
uint32_t aLineNumber);
|
||||
|
||||
|
@ -240,7 +240,7 @@ public:
|
|||
* Parse a selector list for a keyframe rule. Return whether
|
||||
* the parse succeeded.
|
||||
*/
|
||||
bool ParseKeyframeSelectorString(const nsSubstring& aSelectorString,
|
||||
bool ParseKeyframeSelectorString(const nsAString& aSelectorString,
|
||||
nsIURI* aURL,
|
||||
uint32_t aLineNumber,
|
||||
InfallibleTArray<float>& aSelectorList);
|
||||
|
|
|
@ -304,7 +304,7 @@ private:
|
|||
class nsCSSKeyframesRule final : public mozilla::dom::CSSKeyframesRule
|
||||
{
|
||||
public:
|
||||
nsCSSKeyframesRule(const nsSubstring& aName,
|
||||
nsCSSKeyframesRule(const nsAString& aName,
|
||||
uint32_t aLineNumber, uint32_t aColumnNumber)
|
||||
: mozilla::dom::CSSKeyframesRule(aLineNumber, aColumnNumber)
|
||||
, mName(aName)
|
||||
|
|
|
@ -2339,7 +2339,7 @@ struct StyleAnimation
|
|||
{ mTimingFunction = aTimingFunction; }
|
||||
void SetDelay(float aDelay) { mDelay = aDelay; }
|
||||
void SetDuration(float aDuration) { mDuration = aDuration; }
|
||||
void SetName(const nsSubstring& aName) { mName = aName; }
|
||||
void SetName(const nsAString& aName) { mName = aName; }
|
||||
void SetDirection(dom::PlaybackDirection aDirection) { mDirection = aDirection; }
|
||||
void SetFillMode(dom::FillMode aFillMode) { mFillMode = aFillMode; }
|
||||
void SetPlayState(uint8_t aPlayState) { mPlayState = aPlayState; }
|
||||
|
|
|
@ -53,8 +53,8 @@ bool nsStyleUtil::DashMatchCompare(const nsAString& aAttributeValue,
|
|||
}
|
||||
|
||||
bool
|
||||
nsStyleUtil::ValueIncludes(const nsSubstring& aValueList,
|
||||
const nsSubstring& aValue,
|
||||
nsStyleUtil::ValueIncludes(const nsAString& aValueList,
|
||||
const nsAString& aValue,
|
||||
const nsStringComparator& aComparator)
|
||||
{
|
||||
const char16_t *p = aValueList.BeginReading(),
|
||||
|
@ -816,7 +816,7 @@ nsStyleUtil::CSPAllowsInlineStyle(nsIContent* aContent,
|
|||
nsIPrincipal* aPrincipal,
|
||||
nsIURI* aSourceURI,
|
||||
uint32_t aLineNumber,
|
||||
const nsSubstring& aStyleText,
|
||||
const nsAString& aStyleText,
|
||||
nsresult* aRv)
|
||||
{
|
||||
nsresult rv;
|
||||
|
|
|
@ -31,8 +31,8 @@ public:
|
|||
const nsAString& aSelectorValue,
|
||||
const nsStringComparator& aComparator);
|
||||
|
||||
static bool ValueIncludes(const nsSubstring& aValueList,
|
||||
const nsSubstring& aValue,
|
||||
static bool ValueIncludes(const nsAString& aValueList,
|
||||
const nsAString& aValue,
|
||||
const nsStringComparator& aComparator);
|
||||
|
||||
// Append a quoted (with 'quoteChar') and escaped version of aString
|
||||
|
@ -192,7 +192,7 @@ public:
|
|||
nsIPrincipal* aPrincipal,
|
||||
nsIURI* aSourceURI,
|
||||
uint32_t aLineNumber,
|
||||
const nsSubstring& aStyleText,
|
||||
const nsAString& aStyleText,
|
||||
nsresult* aRv);
|
||||
|
||||
template<size_t N>
|
||||
|
|
|
@ -194,7 +194,7 @@ public:
|
|||
// Must be threadsafe for StaticRefPtr/ClearOnShutdown
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SingletonThreadHolder)
|
||||
|
||||
explicit SingletonThreadHolder(const nsCSubstring& aName)
|
||||
explicit SingletonThreadHolder(const nsACString& aName)
|
||||
: mName(aName)
|
||||
{
|
||||
mParentThread = NS_GetCurrentThread();
|
||||
|
|
|
@ -53,7 +53,7 @@ nsBase64Encoder::IsNonBlocking(bool* aNonBlocking)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsBase64Encoder::Finish(nsCSubstring& result)
|
||||
nsBase64Encoder::Finish(nsACString& result)
|
||||
{
|
||||
char* b64 = PL_Base64Encode(mData.get(), mData.Length(), nullptr);
|
||||
if (!b64)
|
||||
|
|
|
@ -20,7 +20,7 @@ class nsBase64Encoder final : public nsIOutputStream {
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOUTPUTSTREAM
|
||||
|
||||
nsresult Finish(nsCSubstring& _result);
|
||||
nsresult Finish(nsACString& _result);
|
||||
private:
|
||||
~nsBase64Encoder() {}
|
||||
|
||||
|
|
|
@ -653,7 +653,7 @@ nsChannelClassifier::IsHostnameWhitelisted(nsIURI *aUri,
|
|||
|
||||
nsCCharSeparatedTokenizer tokenizer(aWhitelisted, ',');
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
const nsCSubstring& token = tokenizer.nextToken();
|
||||
const nsACString& token = tokenizer.nextToken();
|
||||
if (token.Equals(host)) {
|
||||
LOG(("nsChannelClassifier[%p]:StartInternal skipping %s (whitelisted)",
|
||||
this, host.get()));
|
||||
|
|
|
@ -342,7 +342,7 @@ void nsMediaFragmentURIParser::Parse(nsACString& aRef)
|
|||
nsCCharSeparatedTokenizer tokenizer(aRef, '&');
|
||||
|
||||
while (tokenizer.hasMoreTokens()) {
|
||||
const nsCSubstring& nv = tokenizer.nextToken();
|
||||
const nsACString& nv = tokenizer.nextToken();
|
||||
int32_t index = nv.FindChar('=');
|
||||
if (index >= 0) {
|
||||
nsAutoCString name;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
using namespace mozilla;
|
||||
|
||||
nsresult
|
||||
NS_SerializeToString(nsISerializable* obj, nsCSubstring& str)
|
||||
NS_SerializeToString(nsISerializable* obj, nsACString& str)
|
||||
{
|
||||
RefPtr<nsBase64Encoder> stream(new nsBase64Encoder());
|
||||
if (!stream)
|
||||
|
@ -37,7 +37,7 @@ NS_SerializeToString(nsISerializable* obj, nsCSubstring& str)
|
|||
}
|
||||
|
||||
nsresult
|
||||
NS_DeserializeObject(const nsCSubstring& str, nsISupports** obj)
|
||||
NS_DeserializeObject(const nsACString& str, nsISupports** obj)
|
||||
{
|
||||
nsCString decodedData;
|
||||
nsresult rv = Base64Decode(str, decodedData);
|
||||
|
|
|
@ -19,12 +19,12 @@ class nsISerializable;
|
|||
* Serialize an object to an ASCII string.
|
||||
*/
|
||||
nsresult NS_SerializeToString(nsISerializable* obj,
|
||||
nsCSubstring& str);
|
||||
nsACString& str);
|
||||
|
||||
/**
|
||||
* Deserialize an object.
|
||||
*/
|
||||
nsresult NS_DeserializeObject(const nsCSubstring& str,
|
||||
nsresult NS_DeserializeObject(const nsACString& str,
|
||||
nsISupports** obj);
|
||||
|
||||
class nsSerializationHelper final : public nsISerializationHelper
|
||||
|
|
|
@ -431,7 +431,7 @@ nsStandardURL::InvalidateCache(bool invalidateCachedFile)
|
|||
//
|
||||
// Note that the value returned is guaranteed to be in [-1, 3] range.
|
||||
inline int32_t
|
||||
ValidateIPv4Number(const nsCSubstring& host,
|
||||
ValidateIPv4Number(const nsACString& host,
|
||||
int32_t bases[4], int32_t dotIndex[3],
|
||||
bool& onlyBase10, int32_t& length)
|
||||
{
|
||||
|
@ -510,7 +510,7 @@ ValidateIPv4Number(const nsCSubstring& host,
|
|||
}
|
||||
|
||||
inline nsresult
|
||||
ParseIPv4Number10(const nsCSubstring& input, uint32_t& number, uint32_t maxNumber)
|
||||
ParseIPv4Number10(const nsACString& input, uint32_t& number, uint32_t maxNumber)
|
||||
{
|
||||
uint64_t value = 0;
|
||||
const char* current = input.BeginReading();
|
||||
|
@ -532,7 +532,7 @@ ParseIPv4Number10(const nsCSubstring& input, uint32_t& number, uint32_t maxNumbe
|
|||
}
|
||||
|
||||
inline nsresult
|
||||
ParseIPv4Number(const nsCSubstring& input, int32_t base, uint32_t& number, uint32_t maxNumber)
|
||||
ParseIPv4Number(const nsACString& input, int32_t base, uint32_t& number, uint32_t maxNumber)
|
||||
{
|
||||
// Accumulate in the 64-bit value
|
||||
uint64_t value = 0;
|
||||
|
@ -576,7 +576,7 @@ ParseIPv4Number(const nsCSubstring& input, int32_t base, uint32_t& number, uint3
|
|||
|
||||
// IPv4 parser spec: https://url.spec.whatwg.org/#concept-ipv4-parser
|
||||
/* static */ nsresult
|
||||
nsStandardURL::NormalizeIPv4(const nsCSubstring& host, nsCString& result)
|
||||
nsStandardURL::NormalizeIPv4(const nsACString& host, nsCString& result)
|
||||
{
|
||||
int32_t bases[4] = {10,10,10,10};
|
||||
bool onlyBase10 = true; // Track this as a special case
|
||||
|
@ -633,7 +633,7 @@ nsStandardURL::NormalizeIPv4(const nsCSubstring& host, nsCString& result)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsStandardURL::NormalizeIDN(const nsCSubstring &host, nsCString &result)
|
||||
nsStandardURL::NormalizeIDN(const nsACString& host, nsCString& result)
|
||||
{
|
||||
// If host is ACE, then convert to UTF-8. Else, if host is already UTF-8,
|
||||
// then make sure it is normalized per IDN.
|
||||
|
@ -3818,7 +3818,7 @@ nsStandardURL::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
|
|||
|
||||
// For unit tests. Including nsStandardURL.h seems to cause problems via RustURL.h
|
||||
nsresult
|
||||
Test_NormalizeIPv4(const nsCSubstring& host, nsCString& result)
|
||||
Test_NormalizeIPv4(const nsACString& host, nsCString& result)
|
||||
{
|
||||
return nsStandardURL::NormalizeIPv4(host, result);
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ public: /* internal -- HPUX compiler can't handle this being private */
|
|||
};
|
||||
friend class nsSegmentEncoder;
|
||||
|
||||
static nsresult NormalizeIPv4(const nsCSubstring &host, nsCString &result);
|
||||
static nsresult NormalizeIPv4(const nsACString& host, nsCString& result);
|
||||
|
||||
protected:
|
||||
// enum used in a few places to specify how .ref attribute should be handled
|
||||
|
@ -188,7 +188,7 @@ private:
|
|||
|
||||
bool ValidIPv6orHostname(const char *host, uint32_t aLen);
|
||||
static bool IsValidOfBase(unsigned char c, const uint32_t base);
|
||||
nsresult NormalizeIDN(const nsCSubstring &host, nsCString &result);
|
||||
nsresult NormalizeIDN(const nsACString& host, nsCString& result);
|
||||
void CoalescePath(netCoalesceFlags coalesceFlag, char *path);
|
||||
|
||||
uint32_t AppendSegmentToBuf(char *, uint32_t, const char *,
|
||||
|
|
|
@ -1055,7 +1055,7 @@ net_ParseRequestContentType(const nsACString &aHeaderStr,
|
|||
}
|
||||
|
||||
bool
|
||||
net_IsValidHostName(const nsCSubstring &host)
|
||||
net_IsValidHostName(const nsACString& host)
|
||||
{
|
||||
const char *end = host.EndReading();
|
||||
// Use explicit whitelists to select which characters we are
|
||||
|
|
|
@ -228,7 +228,7 @@ inline char *net_RFindCharNotInSet(const char *str, const char *set)
|
|||
* This function returns true if the given hostname does not include any
|
||||
* restricted characters. Otherwise, false is returned.
|
||||
*/
|
||||
bool net_IsValidHostName(const nsCSubstring &host);
|
||||
bool net_IsValidHostName(const nsACString& host);
|
||||
|
||||
/**
|
||||
* Checks whether the IPv4 address is valid according to RFC 3986 section 3.2.2.
|
||||
|
|
|
@ -1358,7 +1358,7 @@ nsOfflineCacheDevice::InitWithSqlite(mozIStorageService * ss)
|
|||
namespace {
|
||||
|
||||
nsresult
|
||||
GetGroupForCache(const nsCSubstring &clientID, nsCString &group)
|
||||
GetGroupForCache(const nsACString& clientID, nsCString& group)
|
||||
{
|
||||
group.Assign(clientID);
|
||||
group.Truncate(group.FindChar('|'));
|
||||
|
@ -2791,8 +2791,8 @@ nsOfflineCacheDevice::CacheOpportunistically(nsIApplicationCache* cache,
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsOfflineCacheDevice::ActivateCache(const nsCSubstring &group,
|
||||
const nsCSubstring &clientID)
|
||||
nsOfflineCacheDevice::ActivateCache(const nsACString& group,
|
||||
const nsACString& clientID)
|
||||
{
|
||||
NS_ENSURE_TRUE(Initialized(), NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
|
@ -2827,8 +2827,8 @@ nsOfflineCacheDevice::ActivateCache(const nsCSubstring &group,
|
|||
}
|
||||
|
||||
bool
|
||||
nsOfflineCacheDevice::IsActiveCache(const nsCSubstring &group,
|
||||
const nsCSubstring &clientID)
|
||||
nsOfflineCacheDevice::IsActiveCache(const nsACString& group,
|
||||
const nsACString& clientID)
|
||||
{
|
||||
nsCString *active = nullptr;
|
||||
MutexAutoLock lock(mLock);
|
||||
|
|
|
@ -143,10 +143,10 @@ public:
|
|||
nsACString const &aOriginSuffix,
|
||||
nsACString &_result);
|
||||
|
||||
nsresult ActivateCache(const nsCSubstring &group,
|
||||
const nsCSubstring &clientID);
|
||||
bool IsActiveCache(const nsCSubstring &group,
|
||||
const nsCSubstring &clientID);
|
||||
nsresult ActivateCache(const nsACString& group,
|
||||
const nsACString& clientID);
|
||||
bool IsActiveCache(const nsACString& group,
|
||||
const nsACString& clientID);
|
||||
nsresult CreateApplicationCache(const nsACString &group,
|
||||
nsIApplicationCache **out);
|
||||
|
||||
|
|
|
@ -256,8 +256,8 @@ nsresult CacheEntry::HashingKey(nsACString &aResult) const
|
|||
}
|
||||
|
||||
// static
|
||||
nsresult CacheEntry::HashingKey(nsCSubstring const& aStorageID,
|
||||
nsCSubstring const& aEnhanceID,
|
||||
nsresult CacheEntry::HashingKey(const nsACString& aStorageID,
|
||||
const nsACString& aEnhanceID,
|
||||
nsIURI* aURI,
|
||||
nsACString &aResult)
|
||||
{
|
||||
|
@ -269,9 +269,9 @@ nsresult CacheEntry::HashingKey(nsCSubstring const& aStorageID,
|
|||
}
|
||||
|
||||
// static
|
||||
nsresult CacheEntry::HashingKey(nsCSubstring const& aStorageID,
|
||||
nsCSubstring const& aEnhanceID,
|
||||
nsCSubstring const& aURISpec,
|
||||
nsresult CacheEntry::HashingKey(const nsACString& aStorageID,
|
||||
const nsACString& aEnhanceID,
|
||||
const nsACString& aURISpec,
|
||||
nsACString &aResult)
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -104,14 +104,14 @@ public:
|
|||
nsresult HashingKeyWithStorage(nsACString &aResult) const;
|
||||
nsresult HashingKey(nsACString &aResult) const;
|
||||
|
||||
static nsresult HashingKey(nsCSubstring const& aStorageID,
|
||||
nsCSubstring const& aEnhanceID,
|
||||
static nsresult HashingKey(const nsACString& aStorageID,
|
||||
const nsACString& aEnhanceID,
|
||||
nsIURI* aURI,
|
||||
nsACString &aResult);
|
||||
|
||||
static nsresult HashingKey(nsCSubstring const& aStorageID,
|
||||
nsCSubstring const& aEnhanceID,
|
||||
nsCSubstring const& aURISpec,
|
||||
static nsresult HashingKey(const nsACString& aStorageID,
|
||||
const nsACString& aEnhanceID,
|
||||
const nsACString& aURISpec,
|
||||
nsACString &aResult);
|
||||
|
||||
// Accessed only on the service management thread
|
||||
|
|
|
@ -183,9 +183,9 @@ public:
|
|||
} // namespace
|
||||
|
||||
already_AddRefed<nsILoadContextInfo>
|
||||
ParseKey(const nsCSubstring &aKey,
|
||||
nsCSubstring *aIdEnhance,
|
||||
nsCSubstring *aURISpec)
|
||||
ParseKey(const nsACString& aKey,
|
||||
nsACString* aIdEnhance,
|
||||
nsACString* aURISpec)
|
||||
{
|
||||
KeyParser parser(aKey);
|
||||
RefPtr<LoadContextInfo> info = parser.Parse();
|
||||
|
@ -228,7 +228,7 @@ AppendKeyPrefix(nsILoadContextInfo* aInfo, nsACString &_retval)
|
|||
}
|
||||
|
||||
void
|
||||
AppendTagWithValue(nsACString & aTarget, char const aTag, nsCSubstring const & aValue)
|
||||
AppendTagWithValue(nsACString& aTarget, char const aTag, const nsACString& aValue)
|
||||
{
|
||||
aTarget.Append(aTag);
|
||||
|
||||
|
|
|
@ -22,15 +22,15 @@ namespace CacheFileUtils {
|
|||
extern const char *kAltDataKey;
|
||||
|
||||
already_AddRefed<nsILoadContextInfo>
|
||||
ParseKey(const nsCSubstring &aKey,
|
||||
nsCSubstring *aIdEnhance = nullptr,
|
||||
nsCSubstring *aURISpec = nullptr);
|
||||
ParseKey(const nsACString& aKey,
|
||||
nsACString* aIdEnhance = nullptr,
|
||||
nsACString* aURISpec = nullptr);
|
||||
|
||||
void
|
||||
AppendKeyPrefix(nsILoadContextInfo *aInfo, nsACString &_retval);
|
||||
|
||||
void
|
||||
AppendTagWithValue(nsACString & aTarget, char const aTag, nsCSubstring const & aValue);
|
||||
AppendTagWithValue(nsACString& aTarget, char const aTag, const nsACString& aValue);
|
||||
|
||||
nsresult
|
||||
KeyMatchesLoadContextInfo(const nsACString &aKey,
|
||||
|
|
|
@ -1493,7 +1493,7 @@ CacheStorageService::AddStorageEntry(CacheStorage const* aStorage,
|
|||
}
|
||||
|
||||
nsresult
|
||||
CacheStorageService::AddStorageEntry(nsCSubstring const& aContextKey,
|
||||
CacheStorageService::AddStorageEntry(const nsACString& aContextKey,
|
||||
const nsACString & aURI,
|
||||
const nsACString & aIdExtension,
|
||||
bool aWriteToDisk,
|
||||
|
@ -1849,7 +1849,7 @@ CacheStorageService::DoomStorageEntries(CacheStorage const* aStorage,
|
|||
}
|
||||
|
||||
nsresult
|
||||
CacheStorageService::DoomStorageEntries(nsCSubstring const& aContextKey,
|
||||
CacheStorageService::DoomStorageEntries(const nsACString& aContextKey,
|
||||
nsILoadContextInfo* aContext,
|
||||
bool aDiskStorage,
|
||||
bool aPinned,
|
||||
|
|
|
@ -294,12 +294,12 @@ private:
|
|||
void PurgeOverMemoryLimit();
|
||||
|
||||
private:
|
||||
nsresult DoomStorageEntries(nsCSubstring const& aContextKey,
|
||||
nsresult DoomStorageEntries(const nsACString& aContextKey,
|
||||
nsILoadContextInfo* aContext,
|
||||
bool aDiskStorage,
|
||||
bool aPin,
|
||||
nsICacheEntryDoomCallback* aCallback);
|
||||
nsresult AddStorageEntry(nsCSubstring const& aContextKey,
|
||||
nsresult AddStorageEntry(const nsACString& aContextKey,
|
||||
const nsACString & aURI,
|
||||
const nsACString & aIdExtension,
|
||||
bool aWriteToDisk,
|
||||
|
|
|
@ -523,7 +523,7 @@ namespace {
|
|||
|
||||
nsresult
|
||||
GetCacheSessionNameForStoragePolicy(
|
||||
nsCSubstring const &scheme,
|
||||
const nsACString& scheme,
|
||||
nsCacheStoragePolicy storagePolicy,
|
||||
bool isPrivate,
|
||||
OriginAttributes const *originAttribs,
|
||||
|
@ -587,7 +587,7 @@ GetCacheSessionNameForStoragePolicy(
|
|||
}
|
||||
|
||||
nsresult
|
||||
GetCacheSession(nsCSubstring const &aScheme,
|
||||
GetCacheSession(const nsACString& aScheme,
|
||||
bool aWriteToDisk,
|
||||
nsILoadContextInfo* aLoadInfo,
|
||||
nsIApplicationCache* aAppCache,
|
||||
|
@ -653,8 +653,8 @@ GetCacheSession(nsCSubstring const &aScheme,
|
|||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(_OldCacheLoad, Runnable, nsICacheListener)
|
||||
|
||||
_OldCacheLoad::_OldCacheLoad(nsCSubstring const& aScheme,
|
||||
nsCSubstring const& aCacheKey,
|
||||
_OldCacheLoad::_OldCacheLoad(const nsACString& aScheme,
|
||||
const nsACString& aCacheKey,
|
||||
nsICacheEntryOpenCallback* aCallback,
|
||||
nsIApplicationCache* aAppCache,
|
||||
nsILoadContextInfo* aLoadInfo,
|
||||
|
@ -1137,7 +1137,7 @@ nsresult _OldStorage::AssembleCacheKey(nsIURI *aURI,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult _OldStorage::ChooseApplicationCache(nsCSubstring const &cacheKey,
|
||||
nsresult _OldStorage::ChooseApplicationCache(const nsACString& cacheKey,
|
||||
nsIApplicationCache** aCache)
|
||||
{
|
||||
nsresult rv;
|
||||
|
|
|
@ -187,8 +187,8 @@ public:
|
|||
NS_DECL_NSIRUNNABLE
|
||||
NS_DECL_NSICACHELISTENER
|
||||
|
||||
_OldCacheLoad(nsCSubstring const& aScheme,
|
||||
nsCSubstring const& aCacheKey,
|
||||
_OldCacheLoad(const nsACString& aScheme,
|
||||
const nsACString& aCacheKey,
|
||||
nsICacheEntryOpenCallback* aCallback,
|
||||
nsIApplicationCache* aAppCache,
|
||||
nsILoadContextInfo* aLoadInfo,
|
||||
|
@ -241,7 +241,7 @@ private:
|
|||
virtual ~_OldStorage();
|
||||
nsresult AssembleCacheKey(nsIURI *aURI, nsACString const & aIdExtension,
|
||||
nsACString & aCacheKey, nsACString & aScheme);
|
||||
nsresult ChooseApplicationCache(nsCSubstring const &cacheKey, nsIApplicationCache** aCache);
|
||||
nsresult ChooseApplicationCache(const nsACString& cacheKey, nsIApplicationCache** aCache);
|
||||
|
||||
nsCOMPtr<nsILoadContextInfo> mLoadInfo;
|
||||
nsCOMPtr<nsIApplicationCache> mAppCache;
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
const nsCString &EntityID() {
|
||||
return mEntityID;
|
||||
}
|
||||
void SetEntityID(const nsCSubstring &entityID) {
|
||||
void SetEntityID(const nsACString& entityID) {
|
||||
mEntityID = entityID;
|
||||
}
|
||||
|
||||
|
|
|
@ -1855,7 +1855,7 @@ nsFtpState::StopProcessing()
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsFtpState::SendFTPCommand(const nsCSubstring& command)
|
||||
nsFtpState::SendFTPCommand(const nsACString& command)
|
||||
{
|
||||
NS_ASSERTION(mControlConnection, "null control connection");
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ private:
|
|||
void KillControlConnection();
|
||||
nsresult StopProcessing();
|
||||
nsresult EstablishControlConnection();
|
||||
nsresult SendFTPCommand(const nsCSubstring& command);
|
||||
nsresult SendFTPCommand(const nsACString& command);
|
||||
void ConvertFilespecToVMS(nsCString& fileSpec);
|
||||
void ConvertDirspecToVMS(nsCString& fileSpec);
|
||||
void ConvertDirspecFromVMS(nsCString& fileSpec);
|
||||
|
|
|
@ -64,7 +64,7 @@ nsFtpControlConnection::OnInputStreamReady(nsIAsyncInputStream *stream)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsFtpControlConnection::nsFtpControlConnection(const nsCSubstring& host,
|
||||
nsFtpControlConnection::nsFtpControlConnection(const nsACString& host,
|
||||
uint32_t port)
|
||||
: mServerType(0), mSessionId(gFtpHandler->GetSessionId())
|
||||
, mUseUTF8(false), mHost(host), mPort(port)
|
||||
|
@ -172,7 +172,7 @@ nsFtpControlConnection::Disconnect(nsresult status)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsFtpControlConnection::Write(const nsCSubstring& command)
|
||||
nsFtpControlConnection::Write(const nsACString& command)
|
||||
{
|
||||
NS_ENSURE_STATE(mSocketOutput);
|
||||
|
||||
|
|
|
@ -46,11 +46,11 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIINPUTSTREAMCALLBACK
|
||||
|
||||
nsFtpControlConnection(const nsCSubstring& host, uint32_t port);
|
||||
nsFtpControlConnection(const nsACString& host, uint32_t port);
|
||||
|
||||
nsresult Connect(nsIProxyInfo* proxyInfo, nsITransportEventSink* eventSink);
|
||||
nsresult Disconnect(nsresult status);
|
||||
nsresult Write(const nsCSubstring& command);
|
||||
nsresult Write(const nsACString& command);
|
||||
|
||||
bool IsAlive();
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ Http2Stream::CreatePushHashKey(const nsCString &scheme,
|
|||
const nsCString &hostHeader,
|
||||
const mozilla::OriginAttributes &originAttributes,
|
||||
uint64_t serial,
|
||||
const nsCSubstring &pathInfo,
|
||||
const nsACString& pathInfo,
|
||||
nsCString &outOrigin,
|
||||
nsCString &outKey)
|
||||
{
|
||||
|
|
|
@ -173,7 +173,7 @@ protected:
|
|||
const nsCString &hostHeader,
|
||||
const mozilla::OriginAttributes &originAttributes,
|
||||
uint64_t serial,
|
||||
const nsCSubstring &pathInfo,
|
||||
const nsACString& pathInfo,
|
||||
nsCString &outOrigin,
|
||||
nsCString &outKey);
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ namespace auth {
|
|||
namespace detail {
|
||||
|
||||
bool
|
||||
MatchesBaseURI(const nsCSubstring &matchScheme,
|
||||
const nsCSubstring &matchHost,
|
||||
MatchesBaseURI(const nsACString& matchScheme,
|
||||
const nsACString& matchHost,
|
||||
int32_t matchPort,
|
||||
nsDependentCSubstring const& url)
|
||||
{
|
||||
|
|
|
@ -1132,7 +1132,7 @@ nsCORSPreflightListener::AddResultToCache(nsIRequest *aRequest)
|
|||
// http://dev.w3.org/2006/waf/access-control (digits 0-9 with no leading or
|
||||
// trailing non-whitespace characters).
|
||||
uint32_t age = 0;
|
||||
nsCSubstring::const_char_iterator iter, end;
|
||||
nsACString::const_char_iterator iter, end;
|
||||
headerVal.BeginReading(iter);
|
||||
headerVal.EndReading(end);
|
||||
while (iter != end) {
|
||||
|
|
|
@ -660,10 +660,10 @@ nsHttpChannelAuthProvider::GetCredentials(const char *challenges,
|
|||
|
||||
nsresult
|
||||
nsHttpChannelAuthProvider::GetAuthorizationMembers(bool proxyAuth,
|
||||
nsCSubstring& scheme,
|
||||
nsACString& scheme,
|
||||
const char*& host,
|
||||
int32_t& port,
|
||||
nsCSubstring& path,
|
||||
nsACString& path,
|
||||
nsHttpAuthIdentity*& ident,
|
||||
nsISupports**& continuationState)
|
||||
{
|
||||
|
@ -1488,7 +1488,7 @@ NS_IMETHODIMP nsHttpChannelAuthProvider::OnCredsGenerated(const char *aGenerated
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsHttpChannelAuthProvider::ContinueOnAuthAvailable(const nsCSubstring& creds)
|
||||
nsHttpChannelAuthProvider::ContinueOnAuthAvailable(const nsACString& creds)
|
||||
{
|
||||
nsresult rv;
|
||||
if (mProxyAuth)
|
||||
|
|
|
@ -97,16 +97,16 @@ private:
|
|||
* with what authorization we work (WWW or proxy).
|
||||
*/
|
||||
MOZ_MUST_USE nsresult
|
||||
GetAuthorizationMembers(bool proxyAuth, nsCSubstring& scheme,
|
||||
GetAuthorizationMembers(bool proxyAuth, nsACString& scheme,
|
||||
const char*& host, int32_t& port,
|
||||
nsCSubstring& path, nsHttpAuthIdentity*& ident,
|
||||
nsACString& path, nsHttpAuthIdentity*& ident,
|
||||
nsISupports**& continuationState);
|
||||
/**
|
||||
* Method called to resume suspended transaction after we got credentials
|
||||
* from the user. Called from OnAuthAvailable callback or OnAuthCancelled
|
||||
* when credentials for next challenge were obtained synchronously.
|
||||
*/
|
||||
MOZ_MUST_USE nsresult ContinueOnAuthAvailable(const nsCSubstring& creds);
|
||||
MOZ_MUST_USE nsresult ContinueOnAuthAvailable(const nsACString& creds);
|
||||
|
||||
MOZ_MUST_USE nsresult DoRedirectChannelToHttps();
|
||||
|
||||
|
|
|
@ -57,14 +57,14 @@ nsHttpRequestHead::SetVersion(nsHttpVersion version)
|
|||
}
|
||||
|
||||
void
|
||||
nsHttpRequestHead::SetRequestURI(const nsCSubstring &s)
|
||||
nsHttpRequestHead::SetRequestURI(const nsACString& s)
|
||||
{
|
||||
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
|
||||
mRequestURI = s;
|
||||
}
|
||||
|
||||
void
|
||||
nsHttpRequestHead::SetPath(const nsCSubstring &s)
|
||||
nsHttpRequestHead::SetPath(const nsACString& s)
|
||||
{
|
||||
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
|
||||
mPath = s;
|
||||
|
|
|
@ -37,8 +37,8 @@ public:
|
|||
|
||||
void SetMethod(const nsACString &method);
|
||||
void SetVersion(nsHttpVersion version);
|
||||
void SetRequestURI(const nsCSubstring &s);
|
||||
void SetPath(const nsCSubstring &s);
|
||||
void SetRequestURI(const nsACString& s);
|
||||
void SetPath(const nsACString& s);
|
||||
uint32_t HeaderCount();
|
||||
|
||||
// Using this function it is possible to itereate through all headers
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
|
||||
// In nsStandardURL.cpp
|
||||
extern nsresult Test_NormalizeIPv4(const nsCSubstring& host, nsCString& result);
|
||||
extern nsresult Test_NormalizeIPv4(const nsACString& host, nsCString& result);
|
||||
|
||||
|
||||
TEST(TestStandardURL, Simple) {
|
||||
|
|
|
@ -200,7 +200,7 @@ nsScannerSubstring::Rebind( const nsAString& aString )
|
|||
acquire_ownership_of_buffer_list();
|
||||
}
|
||||
|
||||
const nsSubstring&
|
||||
const nsAString&
|
||||
nsScannerSubstring::AsString() const
|
||||
{
|
||||
if (mIsDirty)
|
||||
|
|
|
@ -198,7 +198,7 @@ class nsScannerSubstring
|
|||
void Rebind( const nsScannerSubstring&, const nsScannerIterator&, const nsScannerIterator& );
|
||||
void Rebind( const nsAString& );
|
||||
|
||||
const nsSubstring& AsString() const;
|
||||
const nsAString& AsString() const;
|
||||
|
||||
bool GetNextFragment( nsScannerFragment& ) const;
|
||||
bool GetPrevFragment( nsScannerFragment& ) const;
|
||||
|
@ -294,7 +294,7 @@ class nsScannerSharedSubstring
|
|||
const nsScannerIterator& aEnd);
|
||||
|
||||
// Get a mutable reference to this string
|
||||
nsSubstring& writable()
|
||||
nsAString& writable()
|
||||
{
|
||||
if (mBufferList)
|
||||
MakeMutable();
|
||||
|
@ -303,7 +303,7 @@ class nsScannerSharedSubstring
|
|||
}
|
||||
|
||||
// Get a const reference to this string
|
||||
const nsSubstring& str() const { return mString; }
|
||||
const nsAString& str() const { return mString; }
|
||||
|
||||
private:
|
||||
typedef nsScannerBufferList::Buffer Buffer;
|
||||
|
|
|
@ -33,7 +33,7 @@ nsNameSpaceMap::Put(const nsAString& aURI, nsIAtom* aPrefix)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsNameSpaceMap::Put(const nsCSubstring& aURI, nsIAtom* aPrefix)
|
||||
nsNameSpaceMap::Put(const nsACString& aURI, nsIAtom* aPrefix)
|
||||
{
|
||||
Entry* entry;
|
||||
|
||||
|
@ -53,7 +53,7 @@ nsNameSpaceMap::Put(const nsCSubstring& aURI, nsIAtom* aPrefix)
|
|||
}
|
||||
|
||||
nsNameSpaceMap::const_iterator
|
||||
nsNameSpaceMap::GetNameSpaceOf(const nsCSubstring& aURI) const
|
||||
nsNameSpaceMap::GetNameSpaceOf(const nsACString& aURI) const
|
||||
{
|
||||
for (Entry* entry = mEntries; entry != nullptr; entry = entry->mNext) {
|
||||
if (StringBeginsWith(aURI, entry->mURI))
|
||||
|
|
|
@ -16,7 +16,7 @@ class nsNameSpaceMap
|
|||
public:
|
||||
class Entry {
|
||||
public:
|
||||
Entry(const nsCSubstring& aURI, nsIAtom* aPrefix)
|
||||
Entry(const nsACString& aURI, nsIAtom* aPrefix)
|
||||
: mURI(aURI), mPrefix(aPrefix), mNext(nullptr) {
|
||||
MOZ_COUNT_CTOR(nsNameSpaceMap::Entry); }
|
||||
|
||||
|
@ -35,7 +35,7 @@ public:
|
|||
Put(const nsAString& aURI, nsIAtom* aPrefix);
|
||||
|
||||
nsresult
|
||||
Put(const nsCSubstring& aURI, nsIAtom* aPrefix);
|
||||
Put(const nsACString& aURI, nsIAtom* aPrefix);
|
||||
|
||||
class const_iterator {
|
||||
protected:
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
const_iterator last() const {
|
||||
return const_iterator(nullptr); }
|
||||
|
||||
const_iterator GetNameSpaceOf(const nsCSubstring& aURI) const;
|
||||
const_iterator GetNameSpaceOf(const nsACString& aURI) const;
|
||||
|
||||
protected:
|
||||
Entry* mEntries;
|
||||
|
|
|
@ -167,7 +167,7 @@ rdf_BlockingWrite(nsIOutputStream* stream, const char* buf, uint32_t size)
|
|||
}
|
||||
|
||||
static nsresult
|
||||
rdf_BlockingWrite(nsIOutputStream* stream, const nsCSubstring& s)
|
||||
rdf_BlockingWrite(nsIOutputStream* stream, const nsACString& s)
|
||||
{
|
||||
return rdf_BlockingWrite(stream, s.BeginReading(), s.Length());
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
rdf_MakeRelativeRef(const nsCSubstring& aBaseURI, nsCString& aURI)
|
||||
rdf_MakeRelativeRef(const nsACString& aBaseURI, nsCString& aURI)
|
||||
{
|
||||
// This implementation is extremely simple: e.g., it can't compute
|
||||
// relative paths, or anything fancy like that. If the context URI
|
||||
|
|
|
@ -27,7 +27,7 @@ class nsACString;
|
|||
class nsCString;
|
||||
|
||||
nsresult
|
||||
rdf_MakeRelativeRef(const nsCSubstring& aBaseURI, nsCString& aURI);
|
||||
rdf_MakeRelativeRef(const nsACString& aBaseURI, nsCString& aURI);
|
||||
|
||||
void
|
||||
rdf_FormatDate(PRTime aTime, nsACString &aResult);
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace {
|
|||
|
||||
void
|
||||
getSiteKey(const nsACString& hostName, uint16_t port,
|
||||
/*out*/ nsCSubstring& key)
|
||||
/*out*/ nsACString& key)
|
||||
{
|
||||
key = hostName;
|
||||
key.AppendASCII(":");
|
||||
|
@ -1703,7 +1703,7 @@ nsSSLIOLayerHelpers::setInsecureFallbackSites(const nsCString& str)
|
|||
nsCCharSeparatedTokenizer toker(str, ',');
|
||||
|
||||
while (toker.hasMoreTokens()) {
|
||||
const nsCSubstring& host = toker.nextToken();
|
||||
const nsACString& host = toker.nextToken();
|
||||
if (!host.IsEmpty()) {
|
||||
mInsecureFallbackSites.PutEntry(host);
|
||||
}
|
||||
|
@ -1746,7 +1746,7 @@ FallbackPrefRemover::Run()
|
|||
nsCCharSeparatedTokenizer toker(oldValue, ',');
|
||||
nsCString newValue;
|
||||
while (toker.hasMoreTokens()) {
|
||||
const nsCSubstring& host = toker.nextToken();
|
||||
const nsACString& host = toker.nextToken();
|
||||
if (host.Equals(mHost)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -212,7 +212,7 @@ SandboxBrokerPolicyFactory::GetContentPolicy(int aPid)
|
|||
nsAdoptingCString extraPathString =
|
||||
Preferences::GetCString("security.sandbox.content.write_path_whitelist");
|
||||
if (extraPathString) {
|
||||
for (const nsCSubstring& path : extraPathString.Split(',')) {
|
||||
for (const nsACString& path : extraPathString.Split(',')) {
|
||||
nsCString trimPath(path);
|
||||
trimPath.Trim(" ", true, true);
|
||||
policy->AddDynamic(rdwr, trimPath.get());
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
// Special case: if aKeyBegin == aEquals, then there is only one string
|
||||
// and no equal sign, so we treat the entire thing as a key with no value
|
||||
|
||||
QueryKeyValuePair(const nsCSubstring& aSource, int32_t aKeyBegin,
|
||||
QueryKeyValuePair(const nsACString& aSource, int32_t aKeyBegin,
|
||||
int32_t aEquals, int32_t aPastEnd)
|
||||
{
|
||||
if (aEquals == aKeyBegin)
|
||||
|
|
|
@ -316,7 +316,7 @@ LookupCache::GetLookupFragments(const nsACString& aSpec,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
const nsCSubstring& host = Substring(begin, iter++);
|
||||
const nsACString& host = Substring(begin, iter++);
|
||||
nsAutoCString path;
|
||||
path.Assign(Substring(iter, end));
|
||||
|
||||
|
@ -417,7 +417,7 @@ LookupCache::GetHostKeys(const nsACString& aSpec,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
const nsCSubstring& host = Substring(begin, iter);
|
||||
const nsACString& host = Substring(begin, iter);
|
||||
|
||||
if (IsCanonicalizedIP(host)) {
|
||||
nsCString *key = aHostKeys->AppendElement();
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче