#ifndef RenderProgress_h
#define RenderProgress_h
#if ENABLE(PROGRESS_ELEMENT)
#include "RenderBlock.h"
namespace WebCore {
class HTMLProgressElement;
class RenderProgress : public RenderBlock {
public:
explicit RenderProgress(HTMLElement*);
virtual ~RenderProgress();
double position() const { return m_position; }
double animationProgress() const;
double animationStartTime() const { return m_animationStartTime; }
bool isDeterminate() const;
virtual void updateFromElement();
HTMLProgressElement* progressElement() const;
private:
virtual const char* renderName() const { return "RenderProgress"; }
virtual bool isProgress() const { return true; }
virtual bool requiresForcedStyleRecalcPropagation() const { return true; }
virtual bool canBeReplacedWithInlineRunIn() const OVERRIDE;
void animationTimerFired(Timer<RenderProgress>*);
void updateAnimationState();
double m_position;
double m_animationStartTime;
double m_animationRepeatInterval;
double m_animationDuration;
bool m_animating;
Timer<RenderProgress> m_animationTimer;
};
inline RenderProgress* toRenderProgress(RenderObject* object)
{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isProgress());
return static_cast<RenderProgress*>(object);
}
void toRenderProgress(const RenderProgress*);
}
#endif
#endif // RenderProgress_h