Don't calculate stuff with dirty lists. Bug 367243, r=mats, sr=dbaron

git-svn-id: svn://10.0.0.236/trunk@218691 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2007-01-20 01:18:57 +00:00
parent 7273b38be1
commit c9bbb1f3ee
3 changed files with 28 additions and 8 deletions

View File

@@ -2024,15 +2024,22 @@ nsCSSFrameConstructor::CreateGeneratedFrameFor(nsIFrame* aParentFram
return NS_ERROR_OUT_OF_MEMORY;
counterList->Insert(node);
if (counterList->IsLast(node))
node->Calc(counterList);
else {
counterList->SetDirty();
CountersDirty();
PRBool dirty = counterList->IsDirty();
if (!dirty) {
if (counterList->IsLast(node)) {
node->Calc(counterList);
node->GetText(contentString);
}
// In all other cases (list already dirty or node not at the end),
// just start with an empty string for now and when we recalculate
// the list we'll change the value to the right one.
else {
counterList->SetDirty();
CountersDirty();
}
}
textPtr = &node->mText; // text node assigned below
node->GetText(contentString);
}
break;