diff options
Diffstat (limited to 'Source/WebCore/html/HTMLTableElement.h')
-rw-r--r-- | Source/WebCore/html/HTMLTableElement.h | 75 |
1 files changed, 34 insertions, 41 deletions
diff --git a/Source/WebCore/html/HTMLTableElement.h b/Source/WebCore/html/HTMLTableElement.h index 6a0165073..2ea72e6e2 100644 --- a/Source/WebCore/html/HTMLTableElement.h +++ b/Source/WebCore/html/HTMLTableElement.h @@ -23,8 +23,7 @@ * */ -#ifndef HTMLTableElement_h -#define HTMLTableElement_h +#pragma once #include "HTMLElement.h" @@ -37,33 +36,33 @@ class HTMLTableSectionElement; class HTMLTableElement final : public HTMLElement { public: - static PassRefPtr<HTMLTableElement> create(Document&); - static PassRefPtr<HTMLTableElement> create(const QualifiedName&, Document&); + static Ref<HTMLTableElement> create(Document&); + static Ref<HTMLTableElement> create(const QualifiedName&, Document&); - HTMLTableCaptionElement* caption() const; - void setCaption(PassRefPtr<HTMLTableCaptionElement>, ExceptionCode&); + WEBCORE_EXPORT HTMLTableCaptionElement* caption() const; + WEBCORE_EXPORT ExceptionOr<void> setCaption(RefPtr<HTMLTableCaptionElement>&&); - HTMLTableSectionElement* tHead() const; - void setTHead(PassRefPtr<HTMLTableSectionElement>, ExceptionCode&); + WEBCORE_EXPORT HTMLTableSectionElement* tHead() const; + WEBCORE_EXPORT ExceptionOr<void> setTHead(RefPtr<HTMLTableSectionElement>&&); - HTMLTableSectionElement* tFoot() const; - void setTFoot(PassRefPtr<HTMLTableSectionElement>, ExceptionCode&); + WEBCORE_EXPORT HTMLTableSectionElement* tFoot() const; + WEBCORE_EXPORT ExceptionOr<void> setTFoot(RefPtr<HTMLTableSectionElement>&&); - PassRefPtr<HTMLElement> createTHead(); - void deleteTHead(); - PassRefPtr<HTMLElement> createTFoot(); - void deleteTFoot(); - PassRefPtr<HTMLElement> createTBody(); - PassRefPtr<HTMLElement> createCaption(); - void deleteCaption(); - PassRefPtr<HTMLElement> insertRow(int index, ExceptionCode&); - void deleteRow(int index, ExceptionCode&); + WEBCORE_EXPORT Ref<HTMLTableSectionElement> createTHead(); + WEBCORE_EXPORT void deleteTHead(); + WEBCORE_EXPORT Ref<HTMLTableSectionElement> createTFoot(); + WEBCORE_EXPORT void deleteTFoot(); + WEBCORE_EXPORT Ref<HTMLTableSectionElement> createTBody(); + WEBCORE_EXPORT Ref<HTMLTableCaptionElement> createCaption(); + WEBCORE_EXPORT void deleteCaption(); + WEBCORE_EXPORT ExceptionOr<Ref<HTMLElement>> insertRow(int index = -1); + WEBCORE_EXPORT ExceptionOr<void> deleteRow(int index); - PassRefPtr<HTMLCollection> rows(); - PassRefPtr<HTMLCollection> tBodies(); + WEBCORE_EXPORT Ref<HTMLCollection> rows(); + WEBCORE_EXPORT Ref<HTMLCollection> tBodies(); - String rules() const; - String summary() const; + const AtomicString& rules() const; + const AtomicString& summary() const; const StyleProperties* additionalCellStyle(); const StyleProperties* additionalGroupStyle(bool rows); @@ -71,37 +70,31 @@ public: private: HTMLTableElement(const QualifiedName&, Document&); - virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; - virtual bool isPresentationAttribute(const QualifiedName&) const override; - virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override; - virtual bool isURLAttribute(const Attribute&) const override; + void parseAttribute(const QualifiedName&, const AtomicString&) final; + bool isPresentationAttribute(const QualifiedName&) const final; + void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) final; + bool isURLAttribute(const Attribute&) const final; // Used to obtain either a solid or outset border decl and to deal with the frame and rules attributes. - virtual const StyleProperties* additionalPresentationAttributeStyle() override; + const StyleProperties* additionalPresentationAttributeStyle() const final; - virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override; + void addSubresourceAttributeURLs(ListHashSet<URL>&) const final; enum TableRules { UnsetRules, NoneRules, GroupsRules, RowsRules, ColsRules, AllRules }; enum CellBorders { NoBorders, SolidBorders, InsetBorders, SolidBordersColsOnly, SolidBordersRowsOnly }; CellBorders cellBorders() const; - PassRefPtr<StyleProperties> createSharedCellStyle(); + RefPtr<StyleProperties> createSharedCellStyle(); HTMLTableSectionElement* lastBody() const; - bool m_borderAttr; // Sets a precise border width and creates an outset border for the table and for its cells. - bool m_borderColorAttr; // Overrides the outset border and makes it solid for the table and cells instead. - bool m_frameAttr; // Implies a thin border width if no border is set and then a certain set of solid/hidden borders based off the value. - TableRules m_rulesAttr; // Implies a thin border width, a collapsing border model, and all borders on the table becoming set to hidden (if frame/border - // are present, to none otherwise). - - unsigned short m_padding; + bool m_borderAttr { false }; // Sets a precise border width and creates an outset border for the table and for its cells. + bool m_borderColorAttr { false }; // Overrides the outset border and makes it solid for the table and cells instead. + bool m_frameAttr { false }; // Implies a thin border width if no border is set and then a certain set of solid/hidden borders based off the value. + TableRules m_rulesAttr { UnsetRules }; // Implies a thin border width, a collapsing border model, and all borders on the table becoming set to hidden (if frame/border are present, to none otherwise). + unsigned short m_padding { 1 }; RefPtr<StyleProperties> m_sharedCellStyle; }; -NODE_TYPE_CASTS(HTMLTableElement) - } //namespace - -#endif |