mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 977991 patch 6 - Use the faster eRestyle_StyleAttribute path for style attribute changes. r=birtles
This commit is contained in:
parent
c35ea83a99
commit
7fc557d455
@ -1576,7 +1576,8 @@ Element::SetSMILOverrideStyleRule(css::StyleRule* aStyleRule,
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIPresShell> shell = doc->GetShell();
|
||||
if (shell) {
|
||||
shell->RestyleForAnimation(this, eRestyle_Self);
|
||||
shell->RestyleForAnimation(this,
|
||||
eRestyle_StyleAttribute | eRestyle_ChangeAnimationPhase);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ nsHTMLCSSStyleSheet::ElementRulesMatching(nsPresContext* aPresContext,
|
||||
// don't want SMIL animation to trigger new CSS transitions. Instead,
|
||||
// request an Animation restyle, so we still get noticed.
|
||||
aPresContext->PresShell()->RestyleForAnimation(aElement,
|
||||
eRestyle_Self);
|
||||
eRestyle_StyleAttribute | eRestyle_ChangeAnimationPhase);
|
||||
} else {
|
||||
// Animation restyle (or non-restyle traversal of rules)
|
||||
// Now we can walk SMIL overrride style, without triggering transitions.
|
||||
@ -143,7 +143,7 @@ nsHTMLCSSStyleSheet::HasAttributeDependentStyle(AttributeRuleProcessorData* aDat
|
||||
// Perhaps should check that it's XUL, SVG, (or HTML) namespace, but
|
||||
// it doesn't really matter.
|
||||
if (aData->mAttrHasChanged && aData->mAttribute == nsGkAtoms::style) {
|
||||
return eRestyle_Self;
|
||||
return eRestyle_StyleAttribute | eRestyle_ChangeAnimationPhase;
|
||||
}
|
||||
|
||||
return nsRestyleHint(0);
|
||||
|
Loading…
Reference in New Issue
Block a user