本文整理汇总了C++中RenderElement::isCSSAnimating方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderElement::isCSSAnimating方法的具体用法?C++ RenderElement::isCSSAnimating怎么用?C++ RenderElement::isCSSAnimating使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderElement
的用法示例。
在下文中一共展示了RenderElement::isCSSAnimating方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isRunningAcceleratedAnimationOnRenderer
bool AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer(RenderElement& renderer, CSSPropertyID property, AnimationBase::RunningState runningState) const
{
ASSERT(renderer.isCSSAnimating());
ASSERT(m_compositeAnimations.contains(&renderer));
const CompositeAnimation& animation = *m_compositeAnimations.get(&renderer);
return animation.isAnimatingProperty(property, true, runningState);
}
示例2: clear
bool AnimationControllerPrivate::clear(RenderElement& renderer)
{
LOG(Animations, "AnimationControllerPrivate %p clear: %p", this, &renderer);
ASSERT(renderer.isCSSAnimating());
ASSERT(m_compositeAnimations.contains(&renderer));
Element* element = renderer.element();
m_eventsToDispatch.removeAllMatching([element] (const EventToDispatch& info) {
return info.element == element;
});
m_elementChangesToDispatch.removeAllMatching([element](auto& currentElement) {
return currentElement.ptr() == element;
});
// Return false if we didn't do anything OR we are suspended (so we don't try to
// do a setNeedsStyleRecalc() when suspended).
RefPtr<CompositeAnimation> animation = m_compositeAnimations.take(&renderer);
ASSERT(animation);
renderer.setIsCSSAnimating(false);
animation->clearRenderer();
return animation->isSuspended();
}
示例3: computeExtentOfAnimation
bool AnimationController::computeExtentOfAnimation(RenderElement& renderer, LayoutRect& bounds) const
{
if (!renderer.isCSSAnimating())
return true;
return m_data->computeExtentOfAnimation(renderer, bounds);
}
示例4: cancelAnimations
void AnimationController::cancelAnimations(RenderElement& renderer)
{
if (!renderer.isCSSAnimating())
return;
if (!m_data->clear(renderer))
return;
Element* element = renderer.element();
ASSERT(!element || !element->document().inPageCache());
if (element)
element->setNeedsStyleRecalc(SyntheticStyleChange);
}
示例5: animationUpdateBlock
std::unique_ptr<RenderStyle> AnimationControllerPrivate::getAnimatedStyleForRenderer(RenderElement& renderer)
{
AnimationPrivateUpdateBlock animationUpdateBlock(*this);
ASSERT(renderer.isCSSAnimating());
ASSERT(m_compositeAnimations.contains(&renderer));
const CompositeAnimation& rendererAnimations = *m_compositeAnimations.get(&renderer);
std::unique_ptr<RenderStyle> animatingStyle = rendererAnimations.getAnimatedStyle();
if (!animatingStyle)
animatingStyle = RenderStyle::clonePtr(renderer.style());
return animatingStyle;
}
示例6: animationUpdateBlock
PassRefPtr<RenderStyle> AnimationControllerPrivate::getAnimatedStyleForRenderer(RenderElement& renderer)
{
AnimationPrivateUpdateBlock animationUpdateBlock(*this);
ASSERT(renderer.isCSSAnimating());
ASSERT(m_compositeAnimations.contains(&renderer));
const CompositeAnimation& rendererAnimations = *m_compositeAnimations.get(&renderer);
RefPtr<RenderStyle> animatingStyle = rendererAnimations.getAnimatedStyle();
if (!animatingStyle)
animatingStyle = &renderer.style();
return animatingStyle.release();
}
示例7: cancelAnimations
void AnimationController::cancelAnimations(RenderElement& renderer)
{
if (!renderer.isCSSAnimating())
return;
if (!m_data->clear(renderer))
return;
Element* element = renderer.element();
if (!element || element->document().renderTreeBeingDestroyed())
return;
ASSERT(element->document().pageCacheState() == Document::NotInPageCache);
element->invalidateStyleAndLayerComposition();
}
示例8: clonePtr
std::unique_ptr<RenderStyle> AnimationController::getAnimatedStyleForRenderer(RenderElement& renderer)
{
if (!renderer.isCSSAnimating())
return RenderStyle::clonePtr(renderer.style());
return m_data->getAnimatedStyleForRenderer(renderer);
}
示例9:
PassRefPtr<RenderStyle> AnimationController::getAnimatedStyleForRenderer(RenderElement& renderer)
{
if (!renderer.isCSSAnimating())
return &renderer.style();
return m_data->getAnimatedStyleForRenderer(renderer);
}