fix bug 190729 - remove some dead code from xbl

sr=jag, r=bryner
This commit is contained in:
alecf%netscape.com 2003-03-04 01:04:27 +00:00
Родитель 25b0a81f34
Коммит 8c233de9f3
3 изменённых файлов: 18 добавлений и 56 удалений

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

@ -72,20 +72,12 @@ public:
NS_IMETHOD LoadBindings(nsIContent* aContent, const nsAString& aURL, PRBool aAugmentFlag,
nsIXBLBinding** aBinding, PRBool* aResolveStyle) = 0;
// This function clears out the bindings on a given content node.
NS_IMETHOD FlushStyleBindings(nsIContent* aContent) = 0;
// This method loads a binding doc and then builds the specific binding required.
NS_IMETHOD GetBinding(nsIContent* aBoundElement, const nsCString& aURLStr, nsIXBLBinding** aResult) = 0;
// Indicates whether or not a binding is fully loaded.
NS_IMETHOD BindingReady(nsIContent* aBoundElement, const nsCString& aURLStr, PRBool* aIsReady) = 0;
// Retrieves our base class (e.g., tells us what type of frame and content node to build)
NS_IMETHOD ResolveTag(nsIContent* aContent, PRInt32* aNameSpaceID, nsIAtom** aResult) = 0;
NS_IMETHOD GetXBLDocumentInfo(const nsCString& aURLStr, nsIContent* aBoundElement, nsIXBLDocumentInfo** aResult)=0;
// This method checks the hashtable and then calls FetchBindingDocument on a miss.
NS_IMETHOD LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aBoundDocument,
const nsCString& aURI, const nsCString& aRef,
@ -95,8 +87,6 @@ public:
NS_IMETHOD AttachGlobalKeyHandler(nsIDOMEventReceiver* aElement)=0;
NS_IMETHOD AttachGlobalDragHandler(nsIDOMEventReceiver* aElement)=0;
// Helper method for loading an XML doc.
NS_IMETHOD FetchSyncXMLDocument(nsIURI* aURI, nsIDocument** aResult) = 0;
};
#endif // nsIXBLService_h__

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

@ -623,7 +623,7 @@ nsXBLService::LoadBindings(nsIContent* aContent, const nsAString& aURL, PRBool a
return NS_OK;
}
NS_IMETHODIMP
nsresult
nsXBLService::FlushStyleBindings(nsIContent* aContent)
{
nsCOMPtr<nsIDocument> document;
@ -676,7 +676,7 @@ nsXBLService::ResolveTag(nsIContent* aContent, PRInt32* aNameSpaceID, nsIAtom**
return NS_OK;
}
NS_IMETHODIMP
nsresult
nsXBLService::GetXBLDocumentInfo(const nsCString& aURLStr, nsIContent* aBoundElement, nsIXBLDocumentInfo** aResult)
{
*aResult = nsnull;
@ -803,7 +803,7 @@ nsXBLService::FlushMemory()
// Internal helper methods ////////////////////////////////////////////////////////////////
NS_IMETHODIMP nsXBLService::GetBinding(nsIContent* aBoundElement,
nsresult nsXBLService::GetBinding(nsIContent* aBoundElement,
const nsCString& aURLStr,
nsIXBLBinding** aResult)
{
@ -1086,34 +1086,7 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB
return NS_OK;
}
// Helper method for loading an XML doc.
NS_IMETHODIMP
nsXBLService::FetchSyncXMLDocument(nsIURI* aURI, nsIDocument** aResult)
{
*aResult = nsnull;
nsresult rv = NS_OK;
nsCOMPtr<nsIDOMDocument> domDoc;
nsCOMPtr<nsISyncLoadDOMService> loader =
do_GetService("@mozilla.org/content/syncload-dom-service;1", &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIChannel> channel;
rv = NS_NewChannel(getter_AddRefs(channel), aURI, nsnull, nsnull);
NS_ENSURE_SUCCESS(rv, rv);
rv = loader->LoadLocalDocument(channel, nsnull, getter_AddRefs(domDoc));
if (rv == NS_ERROR_FILE_NOT_FOUND) {
return NS_OK;
}
NS_ENSURE_SUCCESS(rv, rv);
// The document is parsed. We now have a prototype document.
// Everything worked, so we can just hand this back now.
return CallQueryInterface(domDoc, aResult);
}
NS_IMETHODIMP
nsresult
nsXBLService::FetchBindingDocument(nsIContent* aBoundElement, nsIDocument* aBoundDocument,
nsIURI* aURI, const nsCString& aRef,
PRBool aForceSyncLoad, nsIDocument** aResult)

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

@ -60,7 +60,9 @@ class nsSupportsHashtable;
class nsHashtable;
class nsIXULPrototypeCache;
class nsXBLService : public nsIXBLService, public nsIObserver, public nsSupportsWeakReference
class nsXBLService : public nsIXBLService,
public nsIObserver,
public nsSupportsWeakReference
{
NS_DECL_ISUPPORTS
@ -69,20 +71,12 @@ class nsXBLService : public nsIXBLService, public nsIObserver, public nsSupports
NS_IMETHOD LoadBindings(nsIContent* aContent, const nsAString& aURL, PRBool aAugmentFlag,
nsIXBLBinding** aBinding, PRBool* aResolveStyle);
// This method loads a binding doc and then builds the specific binding required.
NS_IMETHOD GetBinding(nsIContent* aBoundElement, const nsCString& aURLStr, nsIXBLBinding** aResult);
// Indicates whether or not a binding is fully loaded.
NS_IMETHOD BindingReady(nsIContent* aBoundElement, const nsCString& aURLStr, PRBool* aIsReady);
// This function clears out the bindings on a given content node.
NS_IMETHOD FlushStyleBindings(nsIContent* aContent);
// Gets the object's base class type.
NS_IMETHOD ResolveTag(nsIContent* aContent, PRInt32* aNameSpaceID, nsIAtom** aResult);
NS_IMETHOD GetXBLDocumentInfo(const nsCString& aURLStr, nsIContent* aBoundElement, nsIXBLDocumentInfo** aResult);
// This method checks the hashtable and then calls FetchBindingDocument on a miss.
NS_IMETHOD LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aBoundDocument,
const nsCString& aURI, const nsCString& aRef,
@ -92,22 +86,27 @@ class nsXBLService : public nsIXBLService, public nsIObserver, public nsSupports
NS_IMETHOD AttachGlobalKeyHandler(nsIDOMEventReceiver* aElement);
NS_IMETHOD AttachGlobalDragHandler(nsIDOMEventReceiver* aElement);
// Helper method for loading an XML doc.
NS_IMETHOD FetchSyncXMLDocument(nsIURI* aURI, nsIDocument** aResult);
NS_DECL_NSIOBSERVER
public:
nsXBLService();
virtual ~nsXBLService();
// This function clears out the bindings on a given content node.
nsresult FlushStyleBindings(nsIContent* aContent);
// This method loads a binding doc and then builds the specific binding required.
nsresult GetBinding(nsIContent* aBoundElement, const nsCString& aURLStr, nsIXBLBinding** aResult);
// Release any memory that we can
nsresult FlushMemory();
// This method synchronously loads and parses an XBL file.
NS_IMETHOD FetchBindingDocument(nsIContent* aBoundElement, nsIDocument* aBoundDocument,
nsIURI* aURI, const nsCString& aRef,
PRBool aForceSyncLoad, nsIDocument** aResult);
nsresult FetchBindingDocument(nsIContent* aBoundElement, nsIDocument* aBoundDocument,
nsIURI* aURI, const nsCString& aRef,
PRBool aForceSyncLoad, nsIDocument** aResult);
nsresult GetXBLDocumentInfo(const nsCString& aURLStr, nsIContent* aBoundElement, nsIXBLDocumentInfo** aResult);
// This method loads a binding doc and then builds the specific binding required. It
// can also peek without building.