ProgressShadowElement.h [plain text]
#ifndef ProgressShadowElement_h
#define ProgressShadowElement_h
#if ENABLE(PROGRESS_ELEMENT)
#include "HTMLDivElement.h"
#include <wtf/Forward.h>
namespace WebCore {
class HTMLProgressElement;
class ProgressShadowElement : public HTMLDivElement {
public:
ProgressShadowElement(Document*);
HTMLProgressElement* progressElement() const;
protected:
virtual bool rendererIsNeeded(const NodeRenderingContext&);
};
class ProgressInnerElement FINAL : public ProgressShadowElement {
public:
ProgressInnerElement(Document*);
static PassRefPtr<ProgressInnerElement> create(Document*);
private:
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
virtual bool rendererIsNeeded(const NodeRenderingContext&);
};
class ProgressBarElement FINAL : public ProgressShadowElement {
public:
ProgressBarElement(Document* document)
: ProgressShadowElement(document)
{
DEFINE_STATIC_LOCAL(AtomicString, pseudoId, ("-webkit-progress-bar", AtomicString::ConstructFromLiteral));
setPseudo(pseudoId);
}
static PassRefPtr<ProgressBarElement> create(Document*);
};
inline PassRefPtr<ProgressBarElement> ProgressBarElement::create(Document* document)
{
return adoptRef(new ProgressBarElement(document));
}
class ProgressValueElement FINAL : public ProgressShadowElement {
public:
ProgressValueElement(Document* document)
: ProgressShadowElement(document)
{
DEFINE_STATIC_LOCAL(AtomicString, pseudoId, ("-webkit-progress-value", AtomicString::ConstructFromLiteral));
setPseudo(pseudoId);
}
static PassRefPtr<ProgressValueElement> create(Document*);
void setWidthPercentage(double);
};
inline PassRefPtr<ProgressValueElement> ProgressValueElement::create(Document* document)
{
return adoptRef(new ProgressValueElement(document));
}
}
#endif // ENABLE(PROGRESS_ELEMENT)
#endif // ProgressShadowElement_h