Checked in for fantasai@escape.com. Bug 43220 "author !important rules override user !important rules in user.css". Add User sheets. Rename Backstop sheets into UserAgent. Fix cascading order. r=pierre/sr=hyatt.

This commit is contained in:
pierre@netscape.com
2001-11-06 10:04:05 +00:00
parent 70eb12ef79
commit 027a59a148
13 changed files with 804 additions and 416 deletions

View File

@@ -3924,28 +3924,26 @@ DocumentViewerImpl::CreateStyleSet(nsIDocument* aDocument,
sheets->Count(&count);
for(PRUint32 i=0; i<count; i++) {
sheets->GetElementAt(i, getter_AddRefs(sheet));
// XXX For now, append as backstop until we figure out something
// better to do.
(*aStyleSet)->AppendBackstopStyleSheet(sheet);
(*aStyleSet)->AppendUserStyleSheet(sheet);
}
}
// Append chrome sheets (scrollbars + forms).
nsCOMPtr<nsIDocShell> ds(do_QueryInterface(mContainer));
chromeRegistry->GetBackstopSheets(ds, getter_AddRefs(sheets));
chromeRegistry->GetAgentSheets(ds, getter_AddRefs(sheets));
if(sheets){
nsCOMPtr<nsICSSStyleSheet> sheet;
PRUint32 count;
sheets->Count(&count);
for(PRUint32 i=0; i<count; i++) {
sheets->GetElementAt(i, getter_AddRefs(sheet));
(*aStyleSet)->AppendBackstopStyleSheet(sheet);
(*aStyleSet)->AppendAgentStyleSheet(sheet);
}
}
}
if (mUAStyleSheet) {
(*aStyleSet)->AppendBackstopStyleSheet(mUAStyleSheet);
(*aStyleSet)->AppendAgentStyleSheet(mUAStyleSheet);
}
}
return NS_OK;