Bug 641731: Ignore :visited status in SVG image documents. r=dbaron

This commit is contained in:
Daniel Holbert 2011-10-29 02:43:43 -07:00
parent b15078098b
commit 7fafbc9d28

View File

@ -1257,9 +1257,10 @@ nsCSSRuleProcessor::GetContentState(Element* aElement)
// flip the bits appropriately. We want to do this here, rather
// than in GetContentStateForVisitedHandling, so that we don't
// expose that :visited support is disabled to the Web page.
if ((!gSupportVisitedPseudo ||
gPrivateBrowsingObserver->InPrivateBrowsing()) &&
state.HasState(NS_EVENT_STATE_VISITED)) {
if (state.HasState(NS_EVENT_STATE_VISITED) &&
(!gSupportVisitedPseudo ||
aElement->OwnerDoc()->IsBeingUsedAsImage() ||
gPrivateBrowsingObserver->InPrivateBrowsing())) {
state &= ~NS_EVENT_STATE_VISITED;
state |= NS_EVENT_STATE_UNVISITED;
}