When the PresShell is notified that a styleshet's state has changed, it now notifies the StyleSet so it can rebuild the rule processors. Part of fix for b=38026 that I missed checking in before (r=karnaze)

This commit is contained in:
attinasi%netscape.com 2000-06-22 23:58:03 +00:00
parent 4f7a6834d9
commit d349e5258a
2 changed files with 18 additions and 0 deletions

View File

@ -3239,6 +3239,15 @@ PresShell::StyleSheetDisabledStateChanged(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet, nsIStyleSheet* aStyleSheet,
PRBool aDisabled) PRBool aDisabled)
{ {
nsresult rv = NS_OK;
// first notify the style set that a sheet's state has changed
if (mStyleSet) {
rv = mStyleSet->NotifyStyleSheetStateChanged(aDisabled ? PR_FALSE : PR_TRUE);
}
if (NS_FAILED(rv)) return rv;
// rebuild the frame-world
return ReconstructFrames(); return ReconstructFrames();
} }

View File

@ -3239,6 +3239,15 @@ PresShell::StyleSheetDisabledStateChanged(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet, nsIStyleSheet* aStyleSheet,
PRBool aDisabled) PRBool aDisabled)
{ {
nsresult rv = NS_OK;
// first notify the style set that a sheet's state has changed
if (mStyleSet) {
rv = mStyleSet->NotifyStyleSheetStateChanged(aDisabled ? PR_FALSE : PR_TRUE);
}
if (NS_FAILED(rv)) return rv;
// rebuild the frame-world
return ReconstructFrames(); return ReconstructFrames();
} }