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

git-svn-id: svn://10.0.0.236/trunk@169873 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com
2005-02-25 22:07:01 +00:00
parent 9258ad13c5
commit 165fa3ff89
34 changed files with 570 additions and 967 deletions

View File

@@ -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);

View File

@@ -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