Beispiel #1
0
void
Animation::PostUpdate()
{
  if (!mEffect) {
    return;
  }

  KeyframeEffectReadOnly* keyframeEffect = mEffect->AsKeyframeEffect();
  if (!keyframeEffect) {
    return;
  }

  Maybe<NonOwningAnimationTarget> target = keyframeEffect->GetTarget();
  if (!target) {
    return;
  }

  nsPresContext* presContext = keyframeEffect->GetPresContext();
  if (!presContext) {
    return;
  }

  presContext->EffectCompositor()
             ->RequestRestyle(target->mElement,
                              target->mPseudoType,
                              EffectCompositor::RestyleType::Layer,
                              CascadeLevel());
}
Beispiel #2
0
void
Animation::PostUpdate()
{
  nsPresContext* presContext = GetPresContext();
  if (!presContext) {
    return;
  }

  Element* targetElement;
  nsCSSPseudoElements::Type targetPseudoType;
  mEffect->GetTarget(targetElement, targetPseudoType);
  if (!targetElement) {
    return;
  }

  presContext->EffectCompositor()
             ->RequestRestyle(targetElement,
                              targetPseudoType,
                              EffectCompositor::RestyleType::Layer,
                              CascadeLevel());
}