Part 6 of fix for bug 560273 (Stop using DOM tearoffs from quickstubs) - add nsINode::GetFeature. r=jst.

--HG--
extra : rebase_source : 7b2ef182466615e7b244f7c5e55f327855b3cc6a
This commit is contained in:
Peter Van der Beken 2010-04-19 17:40:16 +02:00
Родитель 7397cb6462
Коммит 3a82de8322
5 изменённых файлов: 13 добавлений и 22 удалений

Просмотреть файл

@ -1005,6 +1005,10 @@ public:
return static_cast<nsIVariant*>(GetProperty(DOM_USER_DATA, key));
}
nsresult GetFeature(const nsAString& aFeature,
const nsAString& aVersion,
nsISupports** aReturn);
void LookupPrefix(const nsAString& aNamespaceURI, nsAString& aPrefix);
PRBool IsDefaultNamespace(const nsAString& aNamespaceURI)
{

Просмотреть файл

@ -605,8 +605,7 @@ nsDOMAttribute::GetFeature(const nsAString& aFeature,
const nsAString& aVersion,
nsISupports** aReturn)
{
return nsGenericElement::InternalGetFeature(static_cast<nsIDOMAttr*>(this),
aFeature, aVersion, aReturn);
return nsINode::GetFeature(aFeature, aVersion, aReturn);
}
NS_IMETHODIMP

Просмотреть файл

@ -5735,8 +5735,7 @@ nsDocument::GetFeature(const nsAString& aFeature,
const nsAString& aVersion,
nsISupports** aReturn)
{
return nsGenericElement::InternalGetFeature(static_cast<nsIDOMDocument*>(this),
aFeature, aVersion, aReturn);
return nsINode::GetFeature(aFeature, aVersion, aReturn);
}
NS_IMETHODIMP

Просмотреть файл

@ -1201,8 +1201,7 @@ nsNode3Tearoff::GetFeature(const nsAString& aFeature,
const nsAString& aVersion,
nsISupports** aReturn)
{
return nsGenericElement::InternalGetFeature(static_cast<nsIDOM3Node*>(this),
aFeature, aVersion, aReturn);
return mContent->GetFeature(aFeature, aVersion, aReturn);
}
NS_IMETHODIMP
@ -2145,9 +2144,8 @@ nsGenericElement::SetPrefix(const nsAString& aPrefix)
return NS_OK;
}
already_AddRefed<nsIDOMNSFeatureFactory>
nsGenericElement::GetDOMFeatureFactory(const nsAString& aFeature,
const nsAString& aVersion)
static already_AddRefed<nsIDOMNSFeatureFactory>
GetDOMFeatureFactory(const nsAString& aFeature, const nsAString& aVersion)
{
nsIDOMNSFeatureFactory *factory = nsnull;
nsCOMPtr<nsICategoryManager> categoryManager =
@ -2243,17 +2241,16 @@ nsGenericElement::InternalIsSupported(nsISupports* aObject,
}
nsresult
nsGenericElement::InternalGetFeature(nsISupports* aObject,
const nsAString& aFeature,
const nsAString& aVersion,
nsISupports** aReturn)
nsINode::GetFeature(const nsAString& aFeature,
const nsAString& aVersion,
nsISupports** aReturn)
{
*aReturn = nsnull;
nsCOMPtr<nsIDOMNSFeatureFactory> factory =
GetDOMFeatureFactory(aFeature, aVersion);
if (factory) {
factory->GetFeature(aObject, aFeature, aVersion, aReturn);
factory->GetFeature(this, aFeature, aVersion, aReturn);
}
return NS_OK;

Просмотреть файл

@ -588,14 +588,6 @@ public:
const nsAString& aVersion,
PRBool* aReturn);
static nsresult InternalGetFeature(nsISupports* aObject,
const nsAString& aFeature,
const nsAString& aVersion,
nsISupports** aReturn);
static already_AddRefed<nsIDOMNSFeatureFactory>
GetDOMFeatureFactory(const nsAString& aFeature, const nsAString& aVersion);
static PRBool ShouldBlur(nsIContent *aContent);
/**