#pragma once
#include "RenderBlockFlow.h"
namespace WebCore {
class HTMLProgressElement;
class RenderProgress final : public RenderBlockFlow {
WTF_MAKE_ISO_ALLOCATED(RenderProgress);
public:
RenderProgress(HTMLElement&, RenderStyle&&);
virtual ~RenderProgress();
double position() const { return m_position; }
double animationProgress() const;
MonotonicTime animationStartTime() const { return m_animationStartTime; }
bool isDeterminate() const;
void updateFromElement() override;
HTMLProgressElement* progressElement() const;
private:
const char* renderName() const override { return "RenderProgress"; }
bool isProgress() const override { return true; }
LogicalExtentComputedValues computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop) const override;
void animationTimerFired();
void updateAnimationState();
double m_position;
MonotonicTime m_animationStartTime;
Seconds m_animationRepeatInterval { 0_s };
Seconds m_animationDuration { 0_s };
bool m_animating { false };
Timer m_animationTimer;
};
}
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderProgress, isProgress())