Bug 279057 - Implement hasFeature for XForms. Patch by smaug, r=bryner/sr=jst

git-svn-id: svn://10.0.0.236/trunk@169429 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
doronr%us.ibm.com
2005-02-18 21:32:46 +00:00
parent e54571aca7
commit 86f11fca63
10 changed files with 180 additions and 18 deletions

View File

@@ -90,7 +90,9 @@ NS_HIDDEN_(nsresult) NS_NewXFormsToggleElement(nsIXTFElement **aResult);
NS_HIDDEN_(nsresult) NS_NewXFormsCaseElement(nsIXTFElement **aResult);
NS_HIDDEN_(nsresult) NS_NewXFormsSwitchElement(nsIXTFElement **aResult);
NS_IMPL_ISUPPORTS1(nsXFormsElementFactory, nsIXTFElementFactory)
NS_IMPL_ISUPPORTS2(nsXFormsElementFactory,
nsIXTFElementFactory,
nsIDOMNSFeatureFactory)
NS_IMETHODIMP
nsXFormsElementFactory::CreateElement(const nsAString& aTagName,
@@ -183,3 +185,23 @@ nsXFormsElementFactory::CreateElement(const nsAString& aTagName,
*aElement = nsnull;
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsXFormsElementFactory::HasFeature(nsISupports *aObject,
const nsAString& aFeature,
const nsAString& aVersion,
PRBool *aReturn)
{
*aReturn = aFeature.EqualsLiteral("org.w3c.xforms.dom") &&
aVersion.EqualsLiteral("1.0");
return NS_OK;
}
NS_IMETHODIMP
nsXFormsElementFactory::GetFeature(nsISupports *aObject,
const nsAString & aFeature,
const nsAString & aVersion,
nsISupports **aReturn)
{
return NS_ERROR_NOT_AVAILABLE;
}