Remove nsIXBLBinding (bug 194834). r+sr=bzbarsky.

This commit is contained in:
bryner%brianryner.com 2006-05-17 02:38:48 +00:00
Родитель 09885755a4
Коммит 3dbe2b5e92
2 изменённых файлов: 5 добавлений и 38 удалений

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

@ -38,7 +38,7 @@
#include "nsISupports.idl"
interface nsISimpleEnumerator;
interface nsIArray;
interface nsISupportsArray;
interface nsIDOMCharacterData;
interface nsIDOMElement;
@ -46,7 +46,7 @@ interface nsIDOMDocument;
interface nsIDOMCSSStyleRule;
interface nsIDOMNode;
[scriptable, uuid(FFFFD059-13D1-4ef7-ACB1-91188C6E31DD)]
[scriptable, uuid(78fd16c2-bdfb-4b1d-8738-d536d0a8f430)]
interface inIDOMUtils : nsISupports
{
// CSS utilities
@ -62,7 +62,7 @@ interface inIDOMUtils : nsISupports
in boolean aShowingAnonymousContent);
// XBL utilities
nsISimpleEnumerator getBindingURLs(in nsIDOMElement aElement);
nsIArray getBindingURLs(in nsIDOMElement aElement);
// content state utilities
long getContentState(in nsIDOMElement aElement);

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

@ -46,8 +46,6 @@
#include "nsIDOMDocument.h"
#include "nsIDOMCharacterData.h"
#include "nsITextContent.h"
#include "nsEnumeratorUtils.h"
#include "nsIXBLBinding.h"
#include "nsRuleNode.h"
#include "nsIStyleRule.h"
#include "nsICSSStyleRule.h"
@ -210,40 +208,9 @@ inDOMUtils::GetRuleLine(nsIDOMCSSStyleRule *aRule, PRUint32 *_retval)
}
NS_IMETHODIMP
inDOMUtils::GetBindingURLs(nsIDOMElement *aElement, nsISimpleEnumerator **_retval)
inDOMUtils::GetBindingURLs(nsIDOMElement *aElement, nsIArray **_retval)
{
nsCOMPtr<nsISupportsArray> urls;
NS_NewISupportsArray(getter_AddRefs(urls));
nsCOMPtr<nsISimpleEnumerator> e;
NS_NewArrayEnumerator(getter_AddRefs(e), urls);
*_retval = e;
NS_ADDREF(*_retval);
nsCOMPtr<nsIDOMDocument> doc1;
aElement->GetOwnerDocument(getter_AddRefs(doc1));
if (!doc1) return NS_OK;
nsCOMPtr<nsIDocument> doc = do_QueryInterface(doc1);
nsIBindingManager *bindingManager = doc->BindingManager();
nsCOMPtr<nsIContent> content = do_QueryInterface(aElement);
nsCOMPtr<nsIXBLBinding> binding;
bindingManager->GetBinding(content, getter_AddRefs(binding));
nsCOMPtr<nsIXBLBinding> tempBinding;
while (binding) {
nsCAutoString uri;
binding->BindingURI()->GetSpec(uri);
nsCOMPtr<nsIAtom> atom = do_GetAtom(uri.get());
urls->AppendElement(atom);
binding->GetBaseBinding(getter_AddRefs(tempBinding));
binding = tempBinding;
}
return NS_OK;
return mCSSUtils->GetBindingURLs(aElement, _retval);
}
NS_IMETHODIMP