summaryrefslogtreecommitdiff
path: root/Source/WebCore/accessibility/AccessibilityTable.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/accessibility/AccessibilityTable.h')
-rw-r--r--Source/WebCore/accessibility/AccessibilityTable.h53
1 files changed, 28 insertions, 25 deletions
diff --git a/Source/WebCore/accessibility/AccessibilityTable.h b/Source/WebCore/accessibility/AccessibilityTable.h
index 3b447d41a..8511b8ecd 100644
--- a/Source/WebCore/accessibility/AccessibilityTable.h
+++ b/Source/WebCore/accessibility/AccessibilityTable.h
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -26,8 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AccessibilityTable_h
-#define AccessibilityTable_h
+#pragma once
#include "AccessibilityRenderObject.h"
#include <wtf/Forward.h>
@@ -35,23 +34,21 @@
namespace WebCore {
class AccessibilityTableCell;
+class HTMLTableElement;
class RenderTableSection;
class AccessibilityTable : public AccessibilityRenderObject {
-
-protected:
- explicit AccessibilityTable(RenderObject*);
public:
- static PassRefPtr<AccessibilityTable> create(RenderObject*);
+ static Ref<AccessibilityTable> create(RenderObject*);
virtual ~AccessibilityTable();
- virtual void init() override;
+ void init() final;
- virtual AccessibilityRole roleValue() const override;
+ AccessibilityRole roleValue() const final;
virtual bool isAriaTable() const { return false; }
- virtual void addChildren() override;
- virtual void clearChildren() override;
+ void addChildren() override;
+ void clearChildren() final;
const AccessibilityChildrenVector& columns();
const AccessibilityChildrenVector& rows();
@@ -59,9 +56,9 @@ public:
virtual bool supportsSelectedRows() { return false; }
unsigned columnCount();
unsigned rowCount();
- virtual int tableLevel() const override;
+ int tableLevel() const final;
- virtual String title() const override;
+ String title() const final;
// all the cells in the table
void cells(AccessibilityChildrenVector&);
@@ -74,32 +71,38 @@ public:
// an object that contains, as children, all the objects that act as headers
AccessibilityObject* headerContainer();
+ // isExposableThroughAccessibility() is whether it is exposed as an AccessibilityTable to the platform.
+ bool isExposableThroughAccessibility() const;
+
+ int ariaColumnCount() const;
+ int ariaRowCount() const;
+
protected:
+ explicit AccessibilityTable(RenderObject*);
+
AccessibilityChildrenVector m_rows;
AccessibilityChildrenVector m_columns;
RefPtr<AccessibilityObject> m_headerContainer;
- bool m_isAccessibilityTable;
+ bool m_isExposableThroughAccessibility;
bool hasARIARole() const;
// isTable is whether it's an AccessibilityTable object.
- virtual bool isTable() const override { return true; }
- // isAccessibilityTable is whether it is exposed as an AccessibilityTable to the platform.
- virtual bool isAccessibilityTable() const override;
+ bool isTable() const final { return true; }
// isDataTable is whether it is exposed as an AccessibilityTable because the heuristic
// think this "looks" like a data-based table (instead of a table used for layout).
- virtual bool isDataTable() const override;
-
- virtual bool isTableExposableThroughAccessibility() const;
- virtual bool computeAccessibilityIsIgnored() const override;
+ bool isDataTable() const final;
+ bool computeAccessibilityIsIgnored() const final;
private:
- virtual void titleElementText(Vector<AccessibilityText>&) const override;
+ virtual bool computeIsTableExposableThroughAccessibility() const;
+ void titleElementText(Vector<AccessibilityText>&) const final;
+ HTMLTableElement* tableElement() const;
+ void addChildrenFromSection(RenderTableSection*, unsigned& maxColumnCount);
+ void addTableCellChild(AccessibilityObject*, HashSet<AccessibilityObject*>& appendedRows, unsigned& columnCount);
};
-ACCESSIBILITY_OBJECT_TYPE_CASTS(AccessibilityTable, isTable())
-
} // namespace WebCore
-#endif // AccessibilityTable_h
+SPECIALIZE_TYPE_TRAITS_ACCESSIBILITY(AccessibilityTable, isTable())