зеркало из https://github.com/mozilla/pjs.git
Bug 592964: Use nsDependentAtomString instead of nsAtomString for temporary variables. r=jst a=jst
This commit is contained in:
Родитель
2440934c36
Коммит
f7c17a7ccc
|
@ -74,7 +74,7 @@ nsNodeInfoManager::GetNodeInfoInnerHashValue(const void *key)
|
|||
reinterpret_cast<const nsINodeInfo::nsNodeInfoInner *>(key);
|
||||
|
||||
if (node->mName) {
|
||||
return HashString(nsAtomString(node->mName));
|
||||
return HashString(nsDependentAtomString(node->mName));
|
||||
}
|
||||
return HashString(*(node->mNameString));
|
||||
}
|
||||
|
|
|
@ -1169,7 +1169,7 @@ MappedAttrParser::ParseMappedAttrValue(nsIAtom* aMappedAttrName,
|
|||
|
||||
// Get the nsCSSProperty ID for our mapped attribute.
|
||||
nsCSSProperty propertyID =
|
||||
nsCSSProps::LookupProperty(nsAtomString(aMappedAttrName));
|
||||
nsCSSProps::LookupProperty(nsDependentAtomString(aMappedAttrName));
|
||||
PRBool changed; // outparam for ParseProperty. (ignored)
|
||||
mParser.ParseProperty(propertyID, aMappedAttrValue, mDocURI, mBaseURI,
|
||||
mNodePrincipal, mDecl, &changed, PR_FALSE);
|
||||
|
@ -2191,7 +2191,8 @@ nsSVGElement::GetAnimatedAttr(nsIAtom* aName)
|
|||
|
||||
// Mapped attributes:
|
||||
if (IsAttributeMapped(aName)) {
|
||||
nsCSSProperty prop = nsCSSProps::LookupProperty(nsAtomString(aName));
|
||||
nsCSSProperty prop =
|
||||
nsCSSProps::LookupProperty(nsDependentAtomString(aName));
|
||||
// Check IsPropertyAnimatable to avoid attributes that...
|
||||
// - map to explicitly unanimatable properties (e.g. 'direction')
|
||||
// - map to unsupported attributes (e.g. 'glyph-orientation-horizontal')
|
||||
|
|
|
@ -172,7 +172,8 @@ createAndAddToResult(nsIAtom* aName, const nsSubstring& aValue,
|
|||
|
||||
nsIDocument* doc = aResultHolder->GetOwnerDoc();
|
||||
nsCOMPtr<nsIContent> elem;
|
||||
nsresult rv = doc->CreateElem(nsAtomString(aName), nsnull, kNameSpaceID_None, PR_FALSE,
|
||||
nsresult rv = doc->CreateElem(nsDependentAtomString(aName),
|
||||
nsnull, kNameSpaceID_None, PR_FALSE,
|
||||
getter_AddRefs(elem));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -219,8 +219,9 @@ txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument,
|
|||
RegisterNameSpace(NS_LITERAL_STRING(kTXNameSpaceURI), namespaceID);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = mDocument->CreateElem(nsAtomString(nsGkAtoms::result), nsGkAtoms::transformiix,
|
||||
namespaceID, PR_FALSE, getter_AddRefs(mTextParent));
|
||||
rv = mDocument->CreateElem(nsDependentAtomString(nsGkAtoms::result),
|
||||
nsGkAtoms::transformiix, namespaceID,
|
||||
PR_FALSE, getter_AddRefs(mTextParent));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
||||
|
|
|
@ -629,8 +629,9 @@ txMozillaXMLOutput::createTxWrapper()
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIContent> wrapper;
|
||||
rv = mDocument->CreateElem(nsAtomString(nsGkAtoms::result), nsGkAtoms::transformiix,
|
||||
namespaceID, PR_FALSE, getter_AddRefs(wrapper));
|
||||
rv = mDocument->CreateElem(nsDependentAtomString(nsGkAtoms::result),
|
||||
nsGkAtoms::transformiix, namespaceID,
|
||||
PR_FALSE, getter_AddRefs(wrapper));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 i, j, childCount = mDocument->GetChildCount();
|
||||
|
|
|
@ -3833,10 +3833,11 @@ nsXULDocument::CreateTemplateBuilder(nsIContent* aElement)
|
|||
getter_AddRefs(bodyContent));
|
||||
|
||||
if (! bodyContent) {
|
||||
nsresult rv = document->CreateElem(nsAtomString(nsGkAtoms::treechildren),
|
||||
nsnull, kNameSpaceID_XUL,
|
||||
PR_FALSE,
|
||||
getter_AddRefs(bodyContent));
|
||||
nsresult rv =
|
||||
document->CreateElem(nsDependentAtomString(nsGkAtoms::treechildren),
|
||||
nsnull, kNameSpaceID_XUL,
|
||||
PR_FALSE,
|
||||
getter_AddRefs(bodyContent));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
aElement->AppendChildTo(bodyContent, PR_FALSE);
|
||||
|
|
Загрузка…
Ссылка в новой задаче