Bug 589615 part 2. Rename the HTML preshint level to just the preshint level, since it's the only preshint level now. r=dbaron, a=dbaron

This commit is contained in:
Boris Zbarsky 2011-01-14 21:14:41 -05:00
Родитель 1f56d9e4bd
Коммит 34b4d820d5
3 изменённых файлов: 18 добавлений и 18 удалений

Просмотреть файл

@ -2224,7 +2224,7 @@ nsDocument::ResetStylesheetsToURI(nsIURI* aURI)
// Remove this sheet from all style sets
nsCOMPtr<nsIPresShell> shell = GetShell();
if (shell) {
shell->StyleSet()->RemoveStyleSheet(nsStyleSet::eHTMLPresHintSheet,
shell->StyleSet()->RemoveStyleSheet(nsStyleSet::ePresHintSheet,
mAttrStyleSheet);
}
mAttrStyleSheet->Reset(aURI);
@ -2269,8 +2269,8 @@ void
nsDocument::FillStyleSet(nsStyleSet* aStyleSet)
{
NS_PRECONDITION(aStyleSet, "Must have a style set");
NS_PRECONDITION(aStyleSet->SheetCount(nsStyleSet::eHTMLPresHintSheet) == 0,
"Style set already has a HTML preshint sheet?");
NS_PRECONDITION(aStyleSet->SheetCount(nsStyleSet::ePresHintSheet) == 0,
"Style set already has a preshint sheet?");
NS_PRECONDITION(aStyleSet->SheetCount(nsStyleSet::eDocSheet) == 0,
"Style set already has document sheets?");
NS_PRECONDITION(aStyleSet->SheetCount(nsStyleSet::eStyleAttrSheet) == 0,
@ -2278,7 +2278,7 @@ nsDocument::FillStyleSet(nsStyleSet* aStyleSet)
NS_PRECONDITION(mStyleAttrStyleSheet, "No style attr stylesheet?");
NS_PRECONDITION(mAttrStyleSheet, "No attr stylesheet?");
aStyleSet->AppendStyleSheet(nsStyleSet::eHTMLPresHintSheet, mAttrStyleSheet);
aStyleSet->AppendStyleSheet(nsStyleSet::ePresHintSheet, mAttrStyleSheet);
aStyleSet->AppendStyleSheet(nsStyleSet::eStyleAttrSheet,
mStyleAttrStyleSheet);

Просмотреть файл

@ -191,7 +191,7 @@ nsStyleSet::GatherRuleProcessors(sheetType aType)
{
mRuleProcessors[aType] = nsnull;
if (mAuthorStyleDisabled && (aType == eDocSheet ||
aType == eHTMLPresHintSheet ||
aType == ePresHintSheet ||
aType == eStyleAttrSheet)) {
//don't regather if this level is disabled
return NS_OK;
@ -308,7 +308,7 @@ nsStyleSet::SetAuthorStyleDisabled(PRBool aStyleDisabled)
mAuthorStyleDisabled = aStyleDisabled;
BeginUpdate();
mDirty |= 1 << eDocSheet |
1 << eHTMLPresHintSheet |
1 << ePresHintSheet |
1 << eStyleAttrSheet;
return EndUpdate();
}
@ -580,7 +580,7 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
// [least important]
// 1. UA normal rules = Agent normal
// 2. User normal rules = User normal
// 3. HTML Presentation hints = HTMLPresHint normal
// 3. Presentation hints = PresHint normal
// 4. Author normal rules = Document normal
// 5. Override normal rules = Override normal
// 6. Author !important rules = Document !important
@ -603,10 +603,10 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
nsRuleNode* lastUserRN = aRuleWalker->CurrentNode();
PRBool haveImportantUserRules = !aRuleWalker->GetCheckForImportantRules();
aRuleWalker->SetLevel(eHTMLPresHintSheet, PR_FALSE, PR_FALSE);
if (mRuleProcessors[eHTMLPresHintSheet])
(*aCollectorFunc)(mRuleProcessors[eHTMLPresHintSheet], aData);
nsRuleNode* lastHTMLPresHintRN = aRuleWalker->CurrentNode();
aRuleWalker->SetLevel(ePresHintSheet, PR_FALSE, PR_FALSE);
if (mRuleProcessors[ePresHintSheet])
(*aCollectorFunc)(mRuleProcessors[ePresHintSheet], aData);
nsRuleNode* lastPresHintRN = aRuleWalker->CurrentNode();
aRuleWalker->SetLevel(eDocSheet, PR_FALSE, PR_TRUE);
PRBool cutOffInheritance = PR_FALSE;
@ -634,11 +634,11 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
if (haveImportantDocRules) {
aRuleWalker->SetLevel(eDocSheet, PR_TRUE, PR_FALSE);
AddImportantRules(lastDocRN, lastHTMLPresHintRN, aRuleWalker); // doc
AddImportantRules(lastDocRN, lastPresHintRN, aRuleWalker); // doc
}
#ifdef DEBUG
else {
AssertNoImportantRules(lastDocRN, lastHTMLPresHintRN);
AssertNoImportantRules(lastDocRN, lastPresHintRN);
}
#endif
@ -653,8 +653,8 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
#endif
#ifdef DEBUG
AssertNoCSSRules(lastHTMLPresHintRN, lastUserRN);
AssertNoImportantRules(lastHTMLPresHintRN, lastUserRN); // HTML preshints
AssertNoCSSRules(lastPresHintRN, lastUserRN);
AssertNoImportantRules(lastPresHintRN, lastUserRN); // preshints
#endif
if (haveImportantUserRules) {
@ -703,8 +703,8 @@ nsStyleSet::WalkRuleProcessors(nsIStyleRuleProcessor::EnumFunc aFunc,
if (!skipUserStyles && mRuleProcessors[eUserSheet]) // NOTE: different
(*aFunc)(mRuleProcessors[eUserSheet], aData);
if (mRuleProcessors[eHTMLPresHintSheet])
(*aFunc)(mRuleProcessors[eHTMLPresHintSheet], aData);
if (mRuleProcessors[ePresHintSheet])
(*aFunc)(mRuleProcessors[ePresHintSheet], aData);
PRBool cutOffInheritance = PR_FALSE;
if (mBindingManager) {

Просмотреть файл

@ -218,7 +218,7 @@ class nsStyleSet
enum sheetType {
eAgentSheet, // CSS
eUserSheet, // CSS
eHTMLPresHintSheet,
ePresHintSheet,
eDocSheet, // CSS
eStyleAttrSheet,
eOverrideSheet, // CSS