Bug 562688 part 8. Change broadcasters to use Element. r=jst

This commit is contained in:
Boris Zbarsky 2010-04-30 09:12:06 -04:00
Родитель 7accfbd87e
Коммит 5c10ea255d
2 изменённых файлов: 10 добавлений и 10 удалений

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

@ -986,11 +986,14 @@ nsXULDocument::AttributeWillChange(nsIDocument* aDocument,
void
nsXULDocument::AttributeChanged(nsIDocument* aDocument,
nsIContent* aElement, PRInt32 aNameSpaceID,
nsIContent* aElementContent, PRInt32 aNameSpaceID,
nsIAtom* aAttribute, PRInt32 aModType)
{
NS_ASSERTION(aDocument == this, "unexpected doc");
// XXXbz once we change AttributeChanged to take Element, we can nix this line
Element* aElement = aElementContent->AsElement();
// Do this here so that all the exit paths below don't leave this undone
nsXMLDocument::AttributeChanged(aDocument, aElement, aNameSpaceID,
aAttribute, aModType);
@ -4231,15 +4234,12 @@ nsXULDocument::TemplateBuilderHookup::Resolve()
//----------------------------------------------------------------------
nsresult
nsXULDocument::FindBroadcaster(nsIContent* aElement,
nsXULDocument::FindBroadcaster(Element* aElement,
nsIDOMElement** aListener,
nsString& aBroadcasterID,
nsString& aAttribute,
nsIDOMElement** aBroadcaster)
{
NS_ASSERTION(aElement->IsElement(),
"Only pass elements into FindBroadcaster!");
nsresult rv;
nsINodeInfo *ni = aElement->NodeInfo();
*aListener = nsnull;
@ -4323,7 +4323,7 @@ nsXULDocument::FindBroadcaster(nsIContent* aElement,
}
nsresult
nsXULDocument::CheckBroadcasterHookup(nsIContent* aElement,
nsXULDocument::CheckBroadcasterHookup(Element* aElement,
PRBool* aNeedsHookup,
PRBool* aDidResolve)
{

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

@ -485,12 +485,12 @@ protected:
{
protected:
nsXULDocument* mDocument; // [WEAK]
nsCOMPtr<nsIContent> mObservesElement; // [OWNER]
nsCOMPtr<mozilla::dom::Element> mObservesElement; // [OWNER]
PRBool mResolved;
public:
BroadcasterHookup(nsXULDocument* aDocument,
nsIContent* aObservesElement)
mozilla::dom::Element* aObservesElement)
: mDocument(aDocument),
mObservesElement(aObservesElement),
mResolved(PR_FALSE)
@ -550,14 +550,14 @@ protected:
// values of the out params should not be relied on (though *aListener and
// *aBroadcaster do need to be released if non-null, of course).
nsresult
FindBroadcaster(nsIContent* aElement,
FindBroadcaster(mozilla::dom::Element* aElement,
nsIDOMElement** aListener,
nsString& aBroadcasterID,
nsString& aAttribute,
nsIDOMElement** aBroadcaster);
nsresult
CheckBroadcasterHookup(nsIContent* aElement,
CheckBroadcasterHookup(mozilla::dom::Element* aElement,
PRBool* aNeedsHookup,
PRBool* aDidResolve);