Bug 461199 (Part 14) - Implement nsIContent::IntrinsicState on mozilla::dom::Link subclasses

All mozilla::dom::Link subclasses need to implement IntrinsicState and make sure
to call LinkState.
r=sicking
sr=bz
This commit is contained in:
Shawn Wilsher 2009-12-15 16:04:09 -08:00
parent 5a5b1276de
commit 8d82ffe93c
5 changed files with 31 additions and 1 deletions

View File

@ -132,6 +132,8 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual void DropCachedHref();
virtual PRInt32 IntrinsicState() const;
};
@ -491,3 +493,9 @@ nsHTMLAnchorElement::DropCachedHref()
{
Link::ResetLinkState();
}
PRInt32
nsHTMLAnchorElement::IntrinsicState() const
{
return Link::LinkState() | nsGenericHTMLElement::IntrinsicState();
}

View File

@ -114,6 +114,8 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual PRInt32 IntrinsicState() const;
protected:
};
@ -329,3 +331,9 @@ nsHTMLAreaElement::GetHrefURI() const
{
return GetHrefURIForAnchors();
}
PRInt32
nsHTMLAreaElement::IntrinsicState() const
{
return Link::LinkState() | nsGenericHTMLElement::IntrinsicState();
}

View File

@ -119,6 +119,8 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual PRInt32 IntrinsicState() const;
protected:
virtual already_AddRefed<nsIURI> GetStyleSheetURL(PRBool* aIsInline);
virtual void GetStyleSheetInfo(nsAString& aTitle,
@ -434,3 +436,9 @@ nsHTMLLinkElement::GetStyleSheetInfo(nsAString& aTitle,
return;
}
PRInt32
nsHTMLLinkElement::IntrinsicState() const
{
return Link::LinkState() | nsGenericHTMLElement::IntrinsicState();
}

View File

@ -257,6 +257,12 @@ nsSVGAElement::GetLinkTarget(nsAString& aTarget)
}
}
PRInt32
nsSVGAElement::IntrinsicState() const
{
return Link::LinkState() | nsSVGAElementBase::IntrinsicState();
}
//----------------------------------------------------------------------
// nsSVGElement methods
@ -266,4 +272,3 @@ nsSVGAElement::GetStringInfo()
return StringAttributesInfo(mStringAttributes, sStringInfo,
NS_ARRAY_LENGTH(sStringInfo));
}

View File

@ -89,6 +89,7 @@ public:
virtual nsLinkState GetLinkState() const;
virtual void SetLinkState(nsLinkState aState);
virtual already_AddRefed<nsIURI> GetHrefURI() const;
virtual PRInt32 IntrinsicState() const;
protected: