| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #ifndef AXTableCell_h | 29 #ifndef AXTableCell_h |
| 30 #define AXTableCell_h | 30 #define AXTableCell_h |
| 31 | 31 |
| 32 #include "modules/accessibility/AXLayoutObject.h" | 32 #include "modules/accessibility/AXLayoutObject.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class AXObjectCacheImpl; | 36 class AXObjectCacheImpl; |
| 37 | 37 |
| 38 class AXTableCell : public AXLayoutObject { | 38 class MODULES_EXPORT AXTableCell : public AXLayoutObject { |
| 39 | 39 |
| 40 protected: | 40 protected: |
| 41 AXTableCell(LayoutObject*, AXObjectCacheImpl&); | 41 AXTableCell(LayoutObject*, AXObjectCacheImpl&); |
| 42 | 42 |
| 43 public: | 43 public: |
| 44 static AXTableCell* create(LayoutObject*, AXObjectCacheImpl&); | 44 static AXTableCell* create(LayoutObject*, AXObjectCacheImpl&); |
| 45 ~AXTableCell() override; | 45 ~AXTableCell() override; |
| 46 | 46 |
| 47 bool isTableCell() const final; | 47 bool isTableCell() const final; |
| 48 | 48 |
| 49 unsigned ariaColumnIndex() const; |
| 50 unsigned ariaRowIndex() const; |
| 51 void setARIAColIndexFromRow(int index) { m_ariaColIndexFromRow = index; } |
| 52 |
| 49 // fills in the start location and row span of cell | 53 // fills in the start location and row span of cell |
| 50 virtual void rowIndexRange(std::pair<unsigned, unsigned>& rowRange); | 54 virtual void rowIndexRange(std::pair<unsigned, unsigned>& rowRange); |
| 51 // fills in the start location and column span of cell | 55 // fills in the start location and column span of cell |
| 52 virtual void columnIndexRange(std::pair<unsigned, unsigned>& columnRange); | 56 virtual void columnIndexRange(std::pair<unsigned, unsigned>& columnRange); |
| 53 // In the case of cells that act as row or column headers. | 57 // In the case of cells that act as row or column headers. |
| 54 SortDirection sortDirection() const final; | 58 SortDirection sortDirection() const final; |
| 55 virtual AccessibilityRole scanToDecideHeaderRole(); | 59 virtual AccessibilityRole scanToDecideHeaderRole(); |
| 56 | 60 |
| 57 protected: | 61 protected: |
| 58 virtual AXObject* parentTable() const; | 62 virtual AXObject* parentTable() const; |
| 63 int m_rowIndex; |
| 64 unsigned m_ariaColIndexFromRow; |
| 59 AccessibilityRole determineAccessibilityRole() final; | 65 AccessibilityRole determineAccessibilityRole() final; |
| 60 | 66 |
| 61 private: | 67 private: |
| 62 bool isTableHeaderCell() const; | 68 bool isTableHeaderCell() const; |
| 63 bool isRowHeaderCell() const; | 69 bool isRowHeaderCell() const; |
| 64 bool isColumnHeaderCell() const; | 70 bool isColumnHeaderCell() const; |
| 65 | 71 |
| 66 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const final; | 72 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const final; |
| 67 }; | 73 }; |
| 68 | 74 |
| 69 DEFINE_AX_OBJECT_TYPE_CASTS(AXTableCell, isTableCell()); | 75 DEFINE_AX_OBJECT_TYPE_CASTS(AXTableCell, isTableCell()); |
| 70 | 76 |
| 71 } // namespace blink | 77 } // namespace blink |
| 72 | 78 |
| 73 #endif // AXTableCell_h | 79 #endif // AXTableCell_h |
| OLD | NEW |