Bug 1380258 - Check corresponding frame in case of pseudo element instead of parent frame. r=birtles

In case of pseudo element, AnimationsWithDestroyedFrame holds the parent
element instead of generated pseudo content, so the primary frame of the
holding content is not the primary frame for pseudo elements. We need to
check correct primary frame respectively.

MozReview-Commit-ID: DleEoV13G1f

--HG--
extra : rebase_source : 9b9ed696eeb088b919e2dc81bd618d333a3284ba
This commit is contained in:
Hiroyuki Ikezoe 2017-07-24 09:20:22 +09:00
parent be8cd7ddc3
commit b10c09fdc7

View File

@ -1814,8 +1814,18 @@ RestyleManager::AnimationsWithDestroyedFrame
nsTransitionManager* transitionManager =
mRestyleManager->PresContext()->TransitionManager();
for (nsIContent* content : aArray) {
if (content->GetPrimaryFrame()) {
continue;
if (aPseudoType == CSSPseudoElementType::NotPseudo) {
if (content->GetPrimaryFrame()) {
continue;
}
} else if (aPseudoType == CSSPseudoElementType::before) {
if (nsLayoutUtils::GetBeforeFrame(content)) {
continue;
}
} else if (aPseudoType == CSSPseudoElementType::after) {
if (nsLayoutUtils::GetAfterFrame(content)) {
continue;
}
}
dom::Element* element = content->AsElement();