mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 697210 - Part c: Remove nsIDocument::CreateElem's aDocumentDefaultType argument; r=bz
This commit is contained in:
parent
fb383b6f7c
commit
d0aac143b2
@ -126,8 +126,8 @@ class Element;
|
||||
} // namespace mozilla
|
||||
|
||||
#define NS_IDOCUMENT_IID \
|
||||
{ 0x5853e8d4, 0xb9c8, 0x462f, \
|
||||
{ 0x8a, 0x22, 0x7e, 0xa8, 0x88, 0xc0, 0x0f, 0x34 } }
|
||||
{ 0x6f88f88d, 0xbd36, 0x4406, \
|
||||
{ 0xb9, 0xc6, 0xb4, 0xd2, 0x22, 0x90, 0x4b, 0x28 } }
|
||||
|
||||
// Flag for AddStyleSheet().
|
||||
#define NS_STYLESHEET_FROM_CATALOG (1 << 0)
|
||||
@ -913,13 +913,9 @@ public:
|
||||
|
||||
/**
|
||||
* Create an element with the specified name, prefix and namespace ID.
|
||||
* If aDocumentDefaultType is true we create an element of the default type
|
||||
* for that document (currently XHTML in HTML documents and XUL in XUL
|
||||
* documents), otherwise we use the type specified by the namespace ID.
|
||||
*/
|
||||
virtual nsresult CreateElem(const nsAString& aName, nsIAtom *aPrefix,
|
||||
PRInt32 aNamespaceID,
|
||||
bool aDocumentDefaultType,
|
||||
nsIContent** aResult) = 0;
|
||||
|
||||
/**
|
||||
|
@ -1482,21 +1482,21 @@ nsDOMImplementation::CreateHTMLDocument(const nsAString& aTitle,
|
||||
|
||||
nsCOMPtr<nsIContent> root;
|
||||
rv = doc->CreateElem(NS_LITERAL_STRING("html"), NULL, kNameSpaceID_XHTML,
|
||||
false, getter_AddRefs(root));
|
||||
getter_AddRefs(root));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = doc->AppendChildTo(root, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIContent> head;
|
||||
rv = doc->CreateElem(NS_LITERAL_STRING("head"), NULL, kNameSpaceID_XHTML,
|
||||
false, getter_AddRefs(head));
|
||||
getter_AddRefs(head));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = root->AppendChildTo(head, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIContent> title;
|
||||
rv = doc->CreateElem(NS_LITERAL_STRING("title"), NULL, kNameSpaceID_XHTML,
|
||||
false, getter_AddRefs(title));
|
||||
getter_AddRefs(title));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = head->AppendChildTo(title, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -1511,7 +1511,7 @@ nsDOMImplementation::CreateHTMLDocument(const nsAString& aTitle,
|
||||
|
||||
nsCOMPtr<nsIContent> body;
|
||||
rv = doc->CreateElem(NS_LITERAL_STRING("body"), NULL, kNameSpaceID_XHTML,
|
||||
false, getter_AddRefs(body));
|
||||
getter_AddRefs(body));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = root->AppendChildTo(body, false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -4380,7 +4380,7 @@ nsDocument::CreateElement(const nsAString& aTagName,
|
||||
}
|
||||
|
||||
rv = CreateElem(needsLowercase ? lcTagName : aTagName,
|
||||
nsnull, mDefaultElementType, false, aReturn);
|
||||
nsnull, mDefaultElementType, aReturn);
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -6710,7 +6710,7 @@ nsDocument::RetrieveRelevantHeaders(nsIChannel *aChannel)
|
||||
|
||||
nsresult
|
||||
nsDocument::CreateElem(const nsAString& aName, nsIAtom *aPrefix, PRInt32 aNamespaceID,
|
||||
bool aDocumentDefaultType, nsIContent **aResult)
|
||||
nsIContent **aResult)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
nsAutoString qName;
|
||||
@ -6731,16 +6731,13 @@ nsDocument::CreateElem(const nsAString& aName, nsIAtom *aPrefix, PRInt32 aNamesp
|
||||
|
||||
*aResult = nsnull;
|
||||
|
||||
PRInt32 elementType = aDocumentDefaultType ? mDefaultElementType :
|
||||
aNamespaceID;
|
||||
|
||||
nsCOMPtr<nsINodeInfo> nodeInfo;
|
||||
mNodeInfoManager->GetNodeInfo(aName, aPrefix, aNamespaceID,
|
||||
nsIDOMNode::ELEMENT_NODE,
|
||||
getter_AddRefs(nodeInfo));
|
||||
NS_ENSURE_TRUE(nodeInfo, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
return NS_NewElement(aResult, elementType, nodeInfo.forget(),
|
||||
return NS_NewElement(aResult, aNamespaceID, nodeInfo.forget(),
|
||||
NOT_FROM_PARSER);
|
||||
}
|
||||
|
||||
|
@ -798,7 +798,6 @@ public:
|
||||
|
||||
virtual nsresult CreateElem(const nsAString& aName, nsIAtom *aPrefix,
|
||||
PRInt32 aNamespaceID,
|
||||
bool aDocumentDefaultType,
|
||||
nsIContent **aResult);
|
||||
|
||||
nsresult CreateElement(const nsAString& aTagName,
|
||||
|
@ -162,7 +162,7 @@ createAndAddToResult(nsIAtom* aName, const nsSubstring& aValue,
|
||||
nsIDocument* doc = aResultHolder->OwnerDoc();
|
||||
nsCOMPtr<nsIContent> elem;
|
||||
nsresult rv = doc->CreateElem(nsDependentAtomString(aName),
|
||||
nsnull, kNameSpaceID_None, false,
|
||||
nsnull, kNameSpaceID_None,
|
||||
getter_AddRefs(elem));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -213,7 +213,7 @@ txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument)
|
||||
|
||||
rv = mDocument->CreateElem(nsDependentAtomString(nsGkAtoms::result),
|
||||
nsGkAtoms::transformiix, namespaceID,
|
||||
false, getter_AddRefs(mTextParent));
|
||||
getter_AddRefs(mTextParent));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
||||
|
@ -658,7 +658,7 @@ txMozillaXMLOutput::createTxWrapper()
|
||||
nsCOMPtr<nsIContent> wrapper;
|
||||
rv = mDocument->CreateElem(nsDependentAtomString(nsGkAtoms::result),
|
||||
nsGkAtoms::transformiix, namespaceID,
|
||||
false, getter_AddRefs(wrapper));
|
||||
getter_AddRefs(wrapper));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRUint32 i, j, childCount = mDocument->GetChildCount();
|
||||
|
@ -153,7 +153,7 @@ NS_IMETHODIMP nsXMLContentBuilder::BeginElement(const nsAString & tagname)
|
||||
nsCOMPtr<nsIContent> node;
|
||||
{
|
||||
EnsureDoc();
|
||||
mDocument->CreateElem(tagname, nsnull, mNamespaceId, false, getter_AddRefs(node));
|
||||
mDocument->CreateElem(tagname, nsnull, mNamespaceId, getter_AddRefs(node));
|
||||
}
|
||||
if (!node) {
|
||||
NS_ERROR("could not create node");
|
||||
|
@ -3850,7 +3850,6 @@ nsXULDocument::CreateTemplateBuilder(nsIContent* aElement)
|
||||
nsresult rv =
|
||||
document->CreateElem(nsDependentAtomString(nsGkAtoms::treechildren),
|
||||
nsnull, kNameSpaceID_XUL,
|
||||
false,
|
||||
getter_AddRefs(bodyContent));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -5013,7 +5013,7 @@ nsEditor::CreateHTMLContent(const nsAString& aTag, nsIContent** aContent)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
return doc->CreateElem(aTag, nsnull, kNameSpaceID_XHTML, false, aContent);
|
||||
return doc->CreateElem(aTag, nsnull, kNameSpaceID_XHTML, aContent);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
Loading…
Reference in New Issue
Block a user