HTMLOListElement.h [plain text]
#ifndef HTMLOListElement_h
#define HTMLOListElement_h
#include "HTMLElement.h"
namespace WebCore {
class HTMLOListElement final : public HTMLElement {
public:
static PassRefPtr<HTMLOListElement> create(Document&);
static PassRefPtr<HTMLOListElement> create(const QualifiedName&, 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:
HTMLOListElement(const QualifiedName&, 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&, MutableStyleProperties&) override;
int m_start;
unsigned m_itemCount;
bool m_hasExplicitStart : 1;
bool m_isReversed : 1;
bool m_shouldRecalculateItemCount : 1;
};
NODE_TYPE_CASTS(HTMLOListElement)
}
#endif