Bug 559491. If a visited style context has no parent then add it to the list of roots. r=dbaron

This commit is contained in:
Timothy Nikkel 2010-04-29 20:15:44 -05:00
parent 163f081451
commit 19b8662309
2 changed files with 3 additions and 3 deletions

View File

@ -589,9 +589,6 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aOther)
void
nsStyleContext::Mark()
{
if (mStyleIfVisited)
mStyleIfVisited->Mark();
// Mark our rule node.
mRuleNode->Mark();

View File

@ -500,6 +500,9 @@ nsStyleSet::GetContext(nsStyleContext* aParentContext,
if (!resultIfVisited) {
return nsnull;
}
if (!parentIfVisited) {
mRoots.AppendElement(resultIfVisited);
}
resultIfVisited->SetIsStyleIfVisited();
result->SetStyleIfVisited(resultIfVisited.forget());