summaryrefslogtreecommitdiff
path: root/Source/WebCore/accessibility/AccessibilityTableCell.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/accessibility/AccessibilityTableCell.h')
-rw-r--r--Source/WebCore/accessibility/AccessibilityTableCell.h48
1 files changed, 29 insertions, 19 deletions
diff --git a/Source/WebCore/accessibility/AccessibilityTableCell.h b/Source/WebCore/accessibility/AccessibilityTableCell.h
index b45d238be..78be9e254 100644
--- a/Source/WebCore/accessibility/AccessibilityTableCell.h
+++ b/Source/WebCore/accessibility/AccessibilityTableCell.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,51 +26,61 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AccessibilityTableCell_h
-#define AccessibilityTableCell_h
+#pragma once
#include "AccessibilityRenderObject.h"
namespace WebCore {
class AccessibilityTable;
-
+class AccessibilityTableRow;
+
class AccessibilityTableCell : public AccessibilityRenderObject {
-
-protected:
- explicit AccessibilityTableCell(RenderObject*);
public:
- static PassRefPtr<AccessibilityTableCell> create(RenderObject*);
+ static Ref<AccessibilityTableCell> create(RenderObject*);
virtual ~AccessibilityTableCell();
- virtual bool isTableCell() const override;
+ bool isTableCell() const final;
bool isTableHeaderCell() const;
+ bool isColumnHeaderCell() const;
+ bool isRowHeaderCell() const;
// fills in the start location and row span of cell
- virtual void rowIndexRange(std::pair<unsigned, unsigned>& rowRange);
+ virtual void rowIndexRange(std::pair<unsigned, unsigned>& rowRange) const;
// fills in the start location and column span of cell
- virtual void columnIndexRange(std::pair<unsigned, unsigned>& columnRange);
+ virtual void columnIndexRange(std::pair<unsigned, unsigned>& columnRange) const;
void columnHeaders(AccessibilityChildrenVector&);
void rowHeaders(AccessibilityChildrenVector&);
+
+ int ariaColumnIndex() const;
+ int ariaRowIndex() const;
+ unsigned ariaColumnSpan() const;
+ unsigned ariaRowSpan() const;
+ void setARIAColIndexFromRow(int index) { m_ariaColIndexFromRow = index; }
protected:
+ explicit AccessibilityTableCell(RenderObject*);
+
+ AccessibilityTableRow* parentRow() const;
virtual AccessibilityTable* parentTable() const;
+ AccessibilityRole determineAccessibilityRole() final;
+
int m_rowIndex;
- virtual AccessibilityRole determineAccessibilityRole() override;
+ int m_ariaColIndexFromRow;
private:
// If a table cell is not exposed as a table cell, a TH element can serve as its title UI element.
- virtual AccessibilityObject* titleUIElement() const override;
- virtual bool exposesTitleUIElement() const override { return true; }
- virtual bool computeAccessibilityIsIgnored() const override;
-
+ AccessibilityObject* titleUIElement() const final;
+ bool exposesTitleUIElement() const final { return true; }
+ bool computeAccessibilityIsIgnored() const final;
+ String expandedTextValue() const final;
+ bool supportsExpandedTextValue() const final;
+
bool isTableCellInSameRowGroup(AccessibilityTableCell*);
bool isTableCellInSameColGroup(AccessibilityTableCell*);
};
-ACCESSIBILITY_OBJECT_TYPE_CASTS(AccessibilityTableCell, isTableCell())
-
} // namespace WebCore
-#endif // AccessibilityTableCell_h
+SPECIALIZE_TYPE_TRAITS_ACCESSIBILITY(AccessibilityTableCell, isTableCell())