зеркало из https://github.com/mozilla/pjs.git
Bug 604595, part a - Remove support for DocumentType.entities and DocumentType.notations; r=sicking
This commit is contained in:
Родитель
dede322bd0
Коммит
aeeccd3d69
|
@ -58,8 +58,8 @@ NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
|
|||
nsNodeInfoManager *aNodeInfoManager,
|
||||
nsIPrincipal *aPrincipal,
|
||||
nsIAtom *aName,
|
||||
nsIDOMNamedNodeMap *aEntities,
|
||||
nsIDOMNamedNodeMap *aNotations,
|
||||
nsIDOMNamedNodeMap*,
|
||||
nsIDOMNamedNodeMap*,
|
||||
const nsAString& aPublicId,
|
||||
const nsAString& aSystemId,
|
||||
const nsAString& aInternalSubset)
|
||||
|
@ -69,17 +69,13 @@ NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
|
|||
NS_ENSURE_ARG_POINTER(aDocType);
|
||||
NS_ENSURE_ARG_POINTER(aName);
|
||||
|
||||
nsresult rv;
|
||||
|
||||
nsRefPtr<nsNodeInfoManager> nimgr;
|
||||
if (aNodeInfoManager) {
|
||||
nimgr = aNodeInfoManager;
|
||||
}
|
||||
else {
|
||||
nimgr = new nsNodeInfoManager();
|
||||
NS_ENSURE_TRUE(nimgr, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
rv = nimgr->Init(nsnull);
|
||||
nsresult rv = nimgr->Init(nsnull);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nimgr->SetDocumentPrincipal(aPrincipal);
|
||||
|
@ -90,12 +86,8 @@ NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
|
|||
kNameSpaceID_None);
|
||||
NS_ENSURE_TRUE(ni, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
*aDocType = new nsDOMDocumentType(ni.forget(), aName, aEntities, aNotations,
|
||||
aPublicId, aSystemId, aInternalSubset);
|
||||
if (!*aDocType) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
*aDocType = new nsDOMDocumentType(ni.forget(), aName, aPublicId, aSystemId,
|
||||
aInternalSubset);
|
||||
NS_ADDREF(*aDocType);
|
||||
|
||||
return NS_OK;
|
||||
|
@ -103,15 +95,11 @@ NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
|
|||
|
||||
nsDOMDocumentType::nsDOMDocumentType(already_AddRefed<nsINodeInfo> aNodeInfo,
|
||||
nsIAtom *aName,
|
||||
nsIDOMNamedNodeMap *aEntities,
|
||||
nsIDOMNamedNodeMap *aNotations,
|
||||
const nsAString& aPublicId,
|
||||
const nsAString& aSystemId,
|
||||
const nsAString& aInternalSubset) :
|
||||
nsGenericDOMDataNode(aNodeInfo),
|
||||
mName(aName),
|
||||
mEntities(aEntities),
|
||||
mNotations(aNotations),
|
||||
mPublicId(aPublicId),
|
||||
mSystemId(aSystemId),
|
||||
mInternalSubset(aInternalSubset)
|
||||
|
@ -158,30 +146,6 @@ nsDOMDocumentType::GetName(nsAString& aName)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMDocumentType::GetEntities(nsIDOMNamedNodeMap** aEntities)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aEntities);
|
||||
|
||||
*aEntities = mEntities;
|
||||
|
||||
NS_IF_ADDREF(*aEntities);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMDocumentType::GetNotations(nsIDOMNamedNodeMap** aNotations)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aNotations);
|
||||
|
||||
*aNotations = mNotations;
|
||||
|
||||
NS_IF_ADDREF(*aNotations);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMDocumentType::GetPublicId(nsAString& aPublicId)
|
||||
{
|
||||
|
@ -238,8 +202,8 @@ nsGenericDOMDataNode*
|
|||
nsDOMDocumentType::CloneDataNode(nsINodeInfo *aNodeInfo, PRBool aCloneText) const
|
||||
{
|
||||
nsCOMPtr<nsINodeInfo> ni = aNodeInfo;
|
||||
return new nsDOMDocumentType(ni.forget(), mName, mEntities, mNotations,
|
||||
mPublicId, mSystemId, mInternalSubset);
|
||||
return new nsDOMDocumentType(ni.forget(), mName, mPublicId, mSystemId,
|
||||
mInternalSubset);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
* Implementation of DOM Core's nsIDOMDocumentType node.
|
||||
*/
|
||||
|
||||
#ifndef nsDOMDocumentType_h___
|
||||
#define nsDOMDocumentType_h___
|
||||
#ifndef nsDOMDocumentType_h
|
||||
#define nsDOMDocumentType_h
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDOMDocumentType.h"
|
||||
|
@ -59,8 +59,6 @@ class nsDOMDocumentType : public nsGenericDOMDataNode,
|
|||
public:
|
||||
nsDOMDocumentType(already_AddRefed<nsINodeInfo> aNodeInfo,
|
||||
nsIAtom *aName,
|
||||
nsIDOMNamedNodeMap *aEntities,
|
||||
nsIDOMNamedNodeMap *aNotations,
|
||||
const nsAString& aPublicId,
|
||||
const nsAString& aSystemId,
|
||||
const nsAString& aInternalSubset);
|
||||
|
@ -86,8 +84,6 @@ public:
|
|||
virtual nsXPCClassInfo* GetClassInfo();
|
||||
protected:
|
||||
nsCOMPtr<nsIAtom> mName;
|
||||
nsCOMPtr<nsIDOMNamedNodeMap> mEntities;
|
||||
nsCOMPtr<nsIDOMNamedNodeMap> mNotations;
|
||||
nsString mPublicId;
|
||||
nsString mSystemId;
|
||||
nsString mInternalSubset;
|
||||
|
@ -104,4 +100,4 @@ NS_NewDOMDocumentType(nsIDOMDocumentType** aDocType,
|
|||
const nsAString& aSystemId,
|
||||
const nsAString& aInternalSubset);
|
||||
|
||||
#endif // nsDOMDocument_h___
|
||||
#endif // nsDOMDocumentType_h
|
||||
|
|
|
@ -49,12 +49,10 @@
|
|||
* http://www.w3.org/TR/DOM-Level-2-Core/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(5725a7de-2883-45a5-878e-30773cd82478)]
|
||||
[scriptable, uuid(bfd028d4-fbbd-4d69-8899-dbee1778dde2)]
|
||||
interface nsIDOMDocumentType : nsIDOMNode
|
||||
{
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute nsIDOMNamedNodeMap entities;
|
||||
readonly attribute nsIDOMNamedNodeMap notations;
|
||||
readonly attribute DOMString publicId;
|
||||
readonly attribute DOMString systemId;
|
||||
readonly attribute DOMString internalSubset;
|
||||
|
|
Загрузка…
Ссылка в новой задаче