зеркало из https://github.com/mozilla/gecko-dev.git
Bug 562688 part 8. Change broadcasters to use Element. r=jst
This commit is contained in:
Родитель
7accfbd87e
Коммит
5c10ea255d
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче