#ifndef HTMLTableElement_h
#define HTMLTableElement_h
#include "core/html/HTMLElement.h"
namespace WebCore {
class ExceptionState;
class HTMLCollection;
class HTMLTableCaptionElement;
class HTMLTableRowsCollection;
class HTMLTableSectionElement;
class HTMLTableElement FINAL : public HTMLElement {
public:
static PassRefPtr<HTMLTableElement> create(Document&);
HTMLTableCaptionElement* caption() const;
void setCaption(PassRefPtr<HTMLTableCaptionElement>, ExceptionState&);
HTMLTableSectionElement* tHead() const;
void setTHead(PassRefPtr<HTMLTableSectionElement>, ExceptionState&);
HTMLTableSectionElement* tFoot() const;
void setTFoot(PassRefPtr<HTMLTableSectionElement>, ExceptionState&);
PassRefPtr<HTMLElement> createTHead();
void deleteTHead();
PassRefPtr<HTMLElement> createTFoot();
void deleteTFoot();
PassRefPtr<HTMLElement> createTBody();
PassRefPtr<HTMLElement> createCaption();
void deleteCaption();
PassRefPtr<HTMLElement> insertRow(int index, ExceptionState&);
void deleteRow(int index, ExceptionState&);
PassRefPtr<HTMLCollection> rows();
PassRefPtr<HTMLCollection> tBodies();
const AtomicString& rules() const;
const AtomicString& summary() const;
const StylePropertySet* additionalCellStyle();
const StylePropertySet* additionalGroupStyle(bool rows);
private:
explicit HTMLTableElement(Document&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) OVERRIDE;
virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE;
virtual const QualifiedName& subResourceAttributeName() const OVERRIDE;
virtual const StylePropertySet* additionalPresentationAttributeStyle() OVERRIDE;
enum TableRules { UnsetRules, NoneRules, GroupsRules, RowsRules, ColsRules, AllRules };
enum CellBorders { NoBorders, SolidBorders, InsetBorders, SolidBordersColsOnly, SolidBordersRowsOnly };
CellBorders cellBorders() const;
PassRefPtr<StylePropertySet> createSharedCellStyle();
HTMLTableSectionElement* lastBody() const;
void setNeedsTableStyleRecalc() const;
bool m_borderAttr;
bool m_borderColorAttr;
bool m_frameAttr;
TableRules m_rulesAttr;
unsigned short m_padding;
RefPtr<StylePropertySet> m_sharedCellStyle;
};
}
#endif