#ifndef HTMLOListElement_h
#define HTMLOListElement_h
#include "core/html/HTMLElement.h"
namespace WebCore {
class HTMLOListElement FINAL : public HTMLElement {
public:
static PassRefPtr<HTMLOListElement> create(Document&);
int start() const { return m_hasExplicitStart ? m_start : (m_isReversed ? itemCount() : 1); }
void setStart(int);
bool isReversed() const { return m_isReversed; }
void itemCountChanged() { m_shouldRecalculateItemCount = true; }
private:
explicit HTMLOListElement(Document&);
void updateItemValues();
unsigned itemCount() const
{
if (m_shouldRecalculateItemCount)
const_cast<HTMLOListElement*>(this)->recalculateItemCount();
return m_itemCount;
}
void recalculateItemCount();
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
int m_start;
unsigned m_itemCount;
bool m_hasExplicitStart : 1;
bool m_isReversed : 1;
bool m_shouldRecalculateItemCount : 1;
};
}
#endif