Bug 1057129 patch 2 - Post all animation restyles directly to pseudo-elements. r=birtles

This (like patch 1) posts restyles directly to the pseudo-element
content nodes, which is a new thing as of this bug.  Previously we'd
have posted eRestyle_Subtree restyles to the pseudo element's real
element (i.e., the parent of the pseudo-element content node).

This changes the way we post animation restyles for ::before and ::after
pseudo-elements with animations on them.
This commit is contained in:
L. David Baron 2014-08-24 21:48:22 -07:00
parent 26e0764f33
commit 50ba17c1ca

View File

@ -266,8 +266,10 @@ struct AnimationPlayerCollection : public PRCList
mozilla::dom::Element* GetElementToRestyle() const;
void PostRestyleForAnimation(nsPresContext *aPresContext) {
nsRestyleHint styleHint = IsForElement() ? eRestyle_Self : eRestyle_Subtree;
aPresContext->PresShell()->RestyleForAnimation(mElement, styleHint);
mozilla::dom::Element* element = GetElementToRestyle();
if (element) {
aPresContext->PresShell()->RestyleForAnimation(element, eRestyle_Self);
}
}
static void LogAsyncAnimationFailure(nsCString& aMessage,