From 673fac74ae5e53570cec9bfcb776b381bdb6b1d2 Mon Sep 17 00:00:00 2001 From: "attinasi%netscape.com" Date: Tue, 16 Apr 2002 00:03:15 +0000 Subject: [PATCH] Migrating patch from trunk to branch: prevent crash by clearing undisplayed map when style sheet is added. b=118014 r=dbaron sr=kin a=asa and jaimejr git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@119032 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/base/src/nsPresShell.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index 4709f24949c..50cadece6e6 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -5361,15 +5361,19 @@ PresShell::ReconstructStyleData(PRBool aRebuildRuleTree) cssFrameConstructor->ProcessRestyledFrames(changeList, mPresContext); changeList.Clear(); - // Clear all undisplayed content in the undisplayed content map. - // These cached style contexts will no longer be valid following - // a full rule tree reconstruct. - frameManager->ClearUndisplayedContentMap(); - // Now do a complete re-resolve of our style tree. set->BeginRuleTreeReconstruct(); } - + + // Clear all undisplayed content in the undisplayed content map. + // These cached style contexts will no longer be valid + // + // HACK? see bug 118014 - this is really being done because some XUL anonymous content + // may have been removed but not cleared from the undisplayed map + // - this should be removed when bug 136704 is fixed + frameManager->ClearUndisplayedContentMap(); + + PRInt32 frameChange = NS_STYLE_HINT_NONE; frameManager->ComputeStyleChangeFor(mPresContext, rootFrame, kNameSpaceID_Unknown, nsnull,