Bug 537139 followup: Call RestyleForAnimation() instead of SMILOverrideStyleChanged(), to avoid triggering CSS Transitions from SMIL changes. r=dbaron

This commit is contained in:
Daniel Holbert
2010-03-11 22:03:49 -08:00
parent a306bdc741
commit 0055964be5
3 changed files with 2 additions and 18 deletions

View File

@@ -3002,14 +3002,13 @@ nsGenericElement::SetSMILOverrideStyleRule(nsICSSStyleRule* aStyleRule,
if (aNotify) {
nsIDocument* doc = GetCurrentDoc();
// Only need to notify PresContexts if we're in a document. (We might not
// Only need to request a restyle if we're in a document. (We might not
// be in a document, if we're clearing animation effects on a target node
// that's been detached since the previous animation sample.)
if (doc) {
nsCOMPtr<nsIPresShell> shell = doc->GetPrimaryShell();
if (shell) {
nsPresContext* presContext = shell->GetPresContext();
presContext->SMILOverrideStyleChanged(this);
shell->RestyleForAnimation(this);
}
}
}