fix assertions when manipulating the MathML attribute style sheet, b=188103, r+sr=bzbarsky

This commit is contained in:
rbs%maths.uq.edu.au 2003-01-07 23:19:56 +00:00
parent a834e8a209
commit de2b601b8f

View File

@ -556,6 +556,9 @@ GetMathMLAttributeStyleSheet(nsIPresContext* aPresContext,
cssSheet->SetDefaultNameSpaceID(kNameSpaceID_MathML); cssSheet->SetDefaultNameSpaceID(kNameSpaceID_MathML);
nsCOMPtr<nsIStyleSheet> sheet(do_QueryInterface(cssSheet)); nsCOMPtr<nsIStyleSheet> sheet(do_QueryInterface(cssSheet));
// all done, no further activity from the net involved, so we better do this
sheet->SetComplete();
// insert the stylesheet into the styleset without notifying observers // insert the stylesheet into the styleset without notifying observers
styleSet->AppendAgentStyleSheet(sheet); styleSet->AppendAgentStyleSheet(sheet);
*aSheet = sheet; *aSheet = sheet;
@ -653,8 +656,6 @@ nsMathMLFrame::MapAttributesIntoCSS(nsIPresContext* aPresContext,
// that may come from reconstructing the frame tree. Our rules only need // that may come from reconstructing the frame tree. Our rules only need
// a re-resolve of style data and a reflow, not a reconstruct-all... // a re-resolve of style data and a reflow, not a reconstruct-all...
sheet->SetOwningDocument(nsnull); sheet->SetOwningDocument(nsnull);
// We're about to manipulate the CSSOM, so we better do this
sheet->SetComplete();
} }
// check for duplicate, if a similar rule is already there, don't bother to add another one // check for duplicate, if a similar rule is already there, don't bother to add another one