2017-10-17 23:11:44 +02:00
|
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=285140
|
|
|
|
|
2017-10-20 03:05:46 +02:00
|
|
|
--- a/layout/style/nsStyleSet.cpp
|
|
|
|
+++ b/layout/style/nsStyleSet.cpp
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -1130,9 +1130,7 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
|
2017-10-17 23:11:44 +02:00
|
|
|
bool haveImportantUARules = !aRuleWalker->GetCheckForImportantRules();
|
|
|
|
|
|
|
|
aRuleWalker->SetLevel(SheetType::User, false, true);
|
|
|
|
- bool skipUserStyles =
|
|
|
|
- aElement && aElement->IsInNativeAnonymousSubtree();
|
|
|
|
- if (!skipUserStyles && mRuleProcessors[SheetType::User]) // NOTE: different
|
|
|
|
+ if (mRuleProcessors[SheetType::User]) // NOTE: different
|
|
|
|
(*aCollectorFunc)(mRuleProcessors[SheetType::User], aData);
|
|
|
|
nsRuleNode* lastUserRN = aRuleWalker->CurrentNode();
|
|
|
|
bool haveImportantUserRules = !aRuleWalker->GetCheckForImportantRules();
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -1154,7 +1152,7 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
|
2017-10-17 23:11:44 +02:00
|
|
|
static_cast<ElementDependentRuleProcessorData*>(aData),
|
|
|
|
&cutOffInheritance);
|
|
|
|
}
|
|
|
|
- if (!skipUserStyles && !cutOffInheritance && // NOTE: different
|
|
|
|
+ if (!cutOffInheritance && // NOTE: different
|
|
|
|
mRuleProcessors[SheetType::Doc])
|
|
|
|
(*aCollectorFunc)(mRuleProcessors[SheetType::Doc], aData);
|
|
|
|
nsRuleNode* lastDocRN = aRuleWalker->CurrentNode();
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -1162,7 +1160,7 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
|
2017-10-17 23:11:44 +02:00
|
|
|
nsTArray<nsRuleNode*> lastScopedRNs;
|
|
|
|
nsTArray<bool> haveImportantScopedRules;
|
|
|
|
bool haveAnyImportantScopedRules = false;
|
|
|
|
- if (!skipUserStyles && !cutOffInheritance &&
|
|
|
|
+ if (!cutOffInheritance &&
|
|
|
|
aElement && aElement->IsElementInStyleScope()) {
|
|
|
|
lastScopedRNs.SetLength(mScopedDocSheetRuleProcessors.Length());
|
|
|
|
haveImportantScopedRules.SetLength(mScopedDocSheetRuleProcessors.Length());
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -1297,8 +1295,7 @@ nsStyleSet::WalkRuleProcessors(nsIStyleRuleProcessor::EnumFunc aFunc,
|
2017-10-17 23:11:44 +02:00
|
|
|
if (mRuleProcessors[SheetType::Agent])
|
|
|
|
(*aFunc)(mRuleProcessors[SheetType::Agent], aData);
|
|
|
|
|
|
|
|
- bool skipUserStyles = aData->mElement->IsInNativeAnonymousSubtree();
|
|
|
|
- if (!skipUserStyles && mRuleProcessors[SheetType::User]) // NOTE: different
|
|
|
|
+ if (mRuleProcessors[SheetType::User]) // NOTE: different
|
|
|
|
(*aFunc)(mRuleProcessors[SheetType::User], aData);
|
|
|
|
|
|
|
|
if (mRuleProcessors[SheetType::PresHint])
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -1316,7 +1313,7 @@ nsStyleSet::WalkRuleProcessors(nsIStyleRuleProcessor::EnumFunc aFunc,
|
2017-10-17 23:11:44 +02:00
|
|
|
mBindingManager->WalkRules(aFunc, aData, &cutOffInheritance);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- if (!skipUserStyles && !cutOffInheritance) {
|
|
|
|
+ if (!cutOffInheritance) {
|
|
|
|
if (mRuleProcessors[SheetType::Doc]) // NOTE: different
|
|
|
|
(*aFunc)(mRuleProcessors[SheetType::Doc], aData);
|
|
|
|
if (aData->mElement->IsElementInStyleScope()) {
|