Bug 59389, eliminate nsIContent::IsSynthetic(). r=jst, a=vidur.

This commit is contained in:
heikki%netscape.com 2000-11-08 00:42:42 +00:00
parent 70cc953e30
commit 3870ddca29
27 changed files with 12 additions and 161 deletions

View File

@ -86,13 +86,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) = 0;
/**
* Test and see if this piece of content is synthetic. Synthetic content
* is content generated stylistically and should normally be ignored
* during content saving.
*/
NS_IMETHOD IsSynthetic(PRBool& aResult) = 0;
/**
* Normalizes an attribute string into an atom that represents the
* qualified attribute name of the attribute. This method is intended

View File

@ -96,9 +96,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) {
return mInner.RemoveChildAt(aIndex, aNotify);
}
NS_IMETHOD IsSynthetic(PRBool& aResult) {
return mInner.IsSynthetic(aResult);
}
NS_IMETHOD GetNameSpaceID(PRInt32& aID) const {
return mInner.GetNameSpaceID(aID);
}

View File

@ -156,8 +156,6 @@ public:
{ return mInner.AppendChildTo(aKid, aNotify); }
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify)
{ return mInner.RemoveChildAt(aIndex, aNotify); }
NS_IMETHOD IsSynthetic(PRBool& aResult)
{ return mInner.IsSynthetic(aResult); }
NS_IMETHOD SetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAReadableString& aValue,
PRBool aNotify)

View File

@ -149,10 +149,6 @@ struct nsGenericDOMDataNode {
nsresult SetDocument(nsIDocument* aDocument, PRBool aDeep, PRBool aCompileEventHandlers);
nsresult GetParent(nsIContent*& aResult) const;
nsresult SetParent(nsIContent* aParent);
nsresult IsSynthetic(PRBool& aResult) {
aResult = PR_FALSE;
return NS_OK;
}
nsresult GetNameSpaceID(PRInt32& aID) const {
aID = kNameSpaceID_None;
return NS_OK;
@ -475,9 +471,6 @@ struct nsGenericDOMDataNode {
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aID) const { \
return _g.GetNameSpaceID(aID); \
} \

View File

@ -181,10 +181,6 @@ public:
nsresult SetDocument(nsIDocument* aDocument, PRBool aDeep, PRBool aCompileEventHandlers);
nsresult GetParent(nsIContent*& aResult) const;
nsresult SetParent(nsIContent* aParent);
nsresult IsSynthetic(PRBool& aResult) {
aResult = PR_FALSE;
return NS_OK;
}
nsresult GetNameSpaceID(PRInt32& aNameSpaceID) const;
nsresult GetTag(nsIAtom*& aResult) const;
nsresult GetNodeInfo(nsINodeInfo*& aResult) const;
@ -600,9 +596,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \
@ -725,9 +718,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \
@ -850,9 +840,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \
@ -973,9 +960,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \
@ -1100,9 +1084,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \
@ -1219,9 +1200,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \

View File

@ -91,11 +91,6 @@ public:
NS_IMETHOD GetParent(nsIContent*& aResult) const;
NS_IMETHOD SetParent(nsIContent* aParent);
NS_IMETHOD IsSynthetic(PRBool& aResult) {
aResult = PR_FALSE;
return NS_OK;
}
NS_IMETHOD GetNameSpaceID(PRInt32& aID) const {
aID = kNameSpaceID_None;
return NS_OK;

View File

@ -99,9 +99,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) {
return mInner.RemoveChildAt(aIndex, aNotify);
}
NS_IMETHOD IsSynthetic(PRBool& aResult) {
return mInner.IsSynthetic(aResult);
}
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const {
return mInner.GetNameSpaceID(aResult);
}

View File

@ -173,9 +173,6 @@ public:
NS_IMETHOD AppendChildTo(nsIContent* aKid, PRBool aNotify);
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify);
NS_IMETHOD IsSynthetic(PRBool& aResult) {
return mInner.IsSynthetic(aResult);
}
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const {
return mInner.GetNameSpaceID(aResult);
}

View File

@ -102,9 +102,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) {
return mInner.RemoveChildAt(aIndex, aNotify);
}
NS_IMETHOD IsSynthetic(PRBool& aResult) {
return mInner.IsSynthetic(aResult);
}
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const {
return mInner.GetNameSpaceID(aResult);
}

View File

@ -103,9 +103,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) {
return mInner.RemoveChildAt(aIndex, aNotify);
}
NS_IMETHOD IsSynthetic(PRBool& aResult) {
return mInner.IsSynthetic(aResult);
}
NS_IMETHOD GetTag(nsIAtom*& aResult) const {
return mInner.GetTag(aResult);
}

View File

@ -2559,13 +2559,6 @@ nsXULElement::RemoveChildAt(PRInt32 aIndex, PRBool aNotify)
return NS_OK;
}
NS_IMETHODIMP
nsXULElement::IsSynthetic(PRBool& aResult)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::GetNameSpaceID(PRInt32& aNameSpaceID) const
{

View File

@ -353,7 +353,6 @@ public:
NS_IMETHOD ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify);
NS_IMETHOD AppendChildTo(nsIContent* aKid, PRBool aNotify);
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify);
NS_IMETHOD IsSynthetic(PRBool& aResult);
NS_IMETHOD GetNameSpaceID(PRInt32& aNameSpeceID) const;
NS_IMETHOD GetTag(nsIAtom*& aResult) const;
NS_IMETHOD GetNodeInfo(nsINodeInfo*& aResult) const;

View File

@ -1854,17 +1854,13 @@ nsXULDocument::SelectAll()
for (i=0;i<n;i++) {
nsIContent * child;
mRootContent->ChildAt(i, child);
PRBool isSynthetic;
child->IsSynthetic(isSynthetic);
if (!isSynthetic) {
nsIAtom * atom;
child->GetTag(atom);
if (bodyStr.EqualsIgnoreCase(atom)) {
body = child;
break;
}
nsCOMPtr<nsIAtom> atom;
child->GetTag(*getter_AddRefs(atom));
if (bodyStr.EqualsIgnoreCase(atom)) {
body = child;
break;
}
NS_RELEASE(child);
}

View File

@ -86,13 +86,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) = 0;
/**
* Test and see if this piece of content is synthetic. Synthetic content
* is content generated stylistically and should normally be ignored
* during content saving.
*/
NS_IMETHOD IsSynthetic(PRBool& aResult) = 0;
/**
* Normalizes an attribute string into an atom that represents the
* qualified attribute name of the attribute. This method is intended

View File

@ -96,9 +96,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) {
return mInner.RemoveChildAt(aIndex, aNotify);
}
NS_IMETHOD IsSynthetic(PRBool& aResult) {
return mInner.IsSynthetic(aResult);
}
NS_IMETHOD GetNameSpaceID(PRInt32& aID) const {
return mInner.GetNameSpaceID(aID);
}

View File

@ -156,8 +156,6 @@ public:
{ return mInner.AppendChildTo(aKid, aNotify); }
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify)
{ return mInner.RemoveChildAt(aIndex, aNotify); }
NS_IMETHOD IsSynthetic(PRBool& aResult)
{ return mInner.IsSynthetic(aResult); }
NS_IMETHOD SetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAReadableString& aValue,
PRBool aNotify)

View File

@ -149,10 +149,6 @@ struct nsGenericDOMDataNode {
nsresult SetDocument(nsIDocument* aDocument, PRBool aDeep, PRBool aCompileEventHandlers);
nsresult GetParent(nsIContent*& aResult) const;
nsresult SetParent(nsIContent* aParent);
nsresult IsSynthetic(PRBool& aResult) {
aResult = PR_FALSE;
return NS_OK;
}
nsresult GetNameSpaceID(PRInt32& aID) const {
aID = kNameSpaceID_None;
return NS_OK;
@ -475,9 +471,6 @@ struct nsGenericDOMDataNode {
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aID) const { \
return _g.GetNameSpaceID(aID); \
} \

View File

@ -181,10 +181,6 @@ public:
nsresult SetDocument(nsIDocument* aDocument, PRBool aDeep, PRBool aCompileEventHandlers);
nsresult GetParent(nsIContent*& aResult) const;
nsresult SetParent(nsIContent* aParent);
nsresult IsSynthetic(PRBool& aResult) {
aResult = PR_FALSE;
return NS_OK;
}
nsresult GetNameSpaceID(PRInt32& aNameSpaceID) const;
nsresult GetTag(nsIAtom*& aResult) const;
nsresult GetNodeInfo(nsINodeInfo*& aResult) const;
@ -600,9 +596,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \
@ -725,9 +718,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \
@ -850,9 +840,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \
@ -973,9 +960,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \
@ -1100,9 +1084,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \
@ -1219,9 +1200,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { \
return _g.RemoveChildAt(aIndex, aNotify); \
} \
NS_IMETHOD IsSynthetic(PRBool& aResult) { \
return _g.IsSynthetic(aResult); \
} \
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const { \
return _g.GetNameSpaceID(aResult); \
} \

View File

@ -91,11 +91,6 @@ public:
NS_IMETHOD GetParent(nsIContent*& aResult) const;
NS_IMETHOD SetParent(nsIContent* aParent);
NS_IMETHOD IsSynthetic(PRBool& aResult) {
aResult = PR_FALSE;
return NS_OK;
}
NS_IMETHOD GetNameSpaceID(PRInt32& aID) const {
aID = kNameSpaceID_None;
return NS_OK;

View File

@ -99,9 +99,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) {
return mInner.RemoveChildAt(aIndex, aNotify);
}
NS_IMETHOD IsSynthetic(PRBool& aResult) {
return mInner.IsSynthetic(aResult);
}
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const {
return mInner.GetNameSpaceID(aResult);
}

View File

@ -173,9 +173,6 @@ public:
NS_IMETHOD AppendChildTo(nsIContent* aKid, PRBool aNotify);
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify);
NS_IMETHOD IsSynthetic(PRBool& aResult) {
return mInner.IsSynthetic(aResult);
}
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const {
return mInner.GetNameSpaceID(aResult);
}

View File

@ -102,9 +102,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) {
return mInner.RemoveChildAt(aIndex, aNotify);
}
NS_IMETHOD IsSynthetic(PRBool& aResult) {
return mInner.IsSynthetic(aResult);
}
NS_IMETHOD GetNameSpaceID(PRInt32& aResult) const {
return mInner.GetNameSpaceID(aResult);
}

View File

@ -103,9 +103,6 @@ public:
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify) {
return mInner.RemoveChildAt(aIndex, aNotify);
}
NS_IMETHOD IsSynthetic(PRBool& aResult) {
return mInner.IsSynthetic(aResult);
}
NS_IMETHOD GetTag(nsIAtom*& aResult) const {
return mInner.GetTag(aResult);
}

View File

@ -1854,17 +1854,13 @@ nsXULDocument::SelectAll()
for (i=0;i<n;i++) {
nsIContent * child;
mRootContent->ChildAt(i, child);
PRBool isSynthetic;
child->IsSynthetic(isSynthetic);
if (!isSynthetic) {
nsIAtom * atom;
child->GetTag(atom);
if (bodyStr.EqualsIgnoreCase(atom)) {
body = child;
break;
}
nsCOMPtr<nsIAtom> atom;
child->GetTag(*getter_AddRefs(atom));
if (bodyStr.EqualsIgnoreCase(atom)) {
body = child;
break;
}
NS_RELEASE(child);
}

View File

@ -2559,13 +2559,6 @@ nsXULElement::RemoveChildAt(PRInt32 aIndex, PRBool aNotify)
return NS_OK;
}
NS_IMETHODIMP
nsXULElement::IsSynthetic(PRBool& aResult)
{
NS_NOTYETIMPLEMENTED("write me!");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULElement::GetNameSpaceID(PRInt32& aNameSpaceID) const
{

View File

@ -353,7 +353,6 @@ public:
NS_IMETHOD ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify);
NS_IMETHOD AppendChildTo(nsIContent* aKid, PRBool aNotify);
NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify);
NS_IMETHOD IsSynthetic(PRBool& aResult);
NS_IMETHOD GetNameSpaceID(PRInt32& aNameSpeceID) const;
NS_IMETHOD GetTag(nsIAtom*& aResult) const;
NS_IMETHOD GetNodeInfo(nsINodeInfo*& aResult) const;

View File

@ -394,15 +394,6 @@ nsRDFDOMDataSource::createContentMiscArcs(nsIContent *content,
appendLeafObject(name, value, arcs);
// syntetic
name.AssignWithConversion("synthetic");
PRBool synthetic;
content->IsSynthetic(synthetic);
value.AssignWithConversion(synthetic ? "yes" : "no");
appendLeafObject(name, value, arcs);
return NS_OK;
}