зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 06fd7e672abd (bug 1382078
)
This commit is contained in:
Родитель
3764de542b
Коммит
55fe61b6d6
|
@ -740,22 +740,23 @@ nsBindingManager::WalkAllRules(nsIStyleRuleProcessor::EnumFunc aFunc,
|
|||
});
|
||||
}
|
||||
|
||||
bool
|
||||
nsBindingManager::MediumFeaturesChanged(nsPresContext* aPresContext)
|
||||
nsresult
|
||||
nsBindingManager::MediumFeaturesChanged(nsPresContext* aPresContext,
|
||||
bool* aRulesChanged)
|
||||
{
|
||||
bool rulesChanged = false;
|
||||
*aRulesChanged = false;
|
||||
RefPtr<nsPresContext> presContext = aPresContext;
|
||||
|
||||
EnumerateBoundContentBindings([=, &rulesChanged](nsXBLBinding* aBinding) {
|
||||
EnumerateBoundContentBindings([=](nsXBLBinding* aBinding) {
|
||||
nsIStyleRuleProcessor* ruleProcessor =
|
||||
aBinding->PrototypeBinding()->GetRuleProcessor();
|
||||
if (ruleProcessor) {
|
||||
bool thisChanged = ruleProcessor->MediumFeaturesChanged(presContext);
|
||||
rulesChanged = rulesChanged || thisChanged;
|
||||
*aRulesChanged = *aRulesChanged || thisChanged;
|
||||
}
|
||||
});
|
||||
|
||||
return rulesChanged;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -135,7 +135,8 @@ public:
|
|||
* the characteristics of the medium, and return whether this rule
|
||||
* processor's rules have changed (e.g., because of media queries).
|
||||
*/
|
||||
bool MediumFeaturesChanged(nsPresContext* aPresContext);
|
||||
nsresult MediumFeaturesChanged(nsPresContext* aPresContext,
|
||||
bool* aRulesChanged);
|
||||
|
||||
void AppendAllSheets(nsTArray<mozilla::StyleSheet*>& aArray);
|
||||
|
||||
|
|
|
@ -2686,8 +2686,8 @@ nsStyleSet::MediumFeaturesChanged(bool aViewportChanged)
|
|||
}
|
||||
|
||||
if (mBindingManager) {
|
||||
bool thisChanged =
|
||||
mBindingManager->MediumFeaturesChanged(presContext);
|
||||
bool thisChanged = false;
|
||||
mBindingManager->MediumFeaturesChanged(presContext, &thisChanged);
|
||||
stylesChanged = stylesChanged || thisChanged;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче