summaryrefslogtreecommitdiff
path: root/dom/animation/EffectCompositor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/animation/EffectCompositor.cpp')
-rw-r--r--dom/animation/EffectCompositor.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/dom/animation/EffectCompositor.cpp b/dom/animation/EffectCompositor.cpp
index c88cabe90b..49da3c0332 100644
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -356,24 +356,16 @@ EffectCompositor::GetElementToRestyle(dom::Element* aElement,
return aElement;
}
- nsIFrame* primaryFrame = aElement->GetPrimaryFrame();
- if (!primaryFrame) {
- return nullptr;
- }
- nsIFrame* pseudoFrame;
if (aPseudoType == CSSPseudoElementType::before) {
- pseudoFrame = nsLayoutUtils::GetBeforeFrame(primaryFrame);
- } else if (aPseudoType == CSSPseudoElementType::after) {
- pseudoFrame = nsLayoutUtils::GetAfterFrame(primaryFrame);
- } else {
- NS_NOTREACHED("Should not try to get the element to restyle for a pseudo "
- "other that :before or :after");
- return nullptr;
+ return nsLayoutUtils::GetBeforePseudo(aElement);
}
- if (!pseudoFrame) {
- return nullptr;
+ if (aPseudoType == CSSPseudoElementType::after) {
+ return nsLayoutUtils::GetAfterPseudo(aElement);
}
- return pseudoFrame->GetContent()->AsElement();
+
+ NS_NOTREACHED("Should not try to get the element to restyle for a pseudo "
+ "other that :before or :after");
+ return nullptr;
}
bool