| 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 WTF_MAKE_NONCOPYABLE(AXTableCell); | 39 WTF_MAKE_NONCOPYABLE(AXTableCell); |
| 40 | 40 |
| 41 protected: | 41 protected: |
| 42 AXTableCell(LayoutObject*, AXObjectCacheImpl&); | 42 AXTableCell(LayoutObject*, AXObjectCacheImpl&); |
| 43 | 43 |
| 44 public: | 44 public: |
| 45 static AXTableCell* create(LayoutObject*, AXObjectCacheImpl&); | 45 static AXTableCell* create(LayoutObject*, AXObjectCacheImpl&); |
| 46 ~AXTableCell() override; | 46 ~AXTableCell() override; |
| 47 | 47 |
| 48 bool isTableCell() const final; | 48 bool isTableCell() const final; |
| 49 | 49 |
| 50 // fills in the start location and row span of cell | 50 // fills in the start location and row span of cell |
| 51 virtual void rowIndexRange(std::pair<unsigned, unsigned>& rowRange); | 51 virtual void rowIndexRange(std::pair<unsigned, unsigned>& rowRange); |
| 52 // fills in the start location and column span of cell | 52 // fills in the start location and column span of cell |
| 53 virtual void columnIndexRange(std::pair<unsigned, unsigned>& columnRange); | 53 virtual void columnIndexRange(std::pair<unsigned, unsigned>& columnRange); |
| 54 // In the case of cells that act as row or column headers. | 54 // In the case of cells that act as row or column headers. |
| 55 SortDirection getSortDirection() const final; | 55 SortDirection getSortDirection() const final; |
| 56 virtual AccessibilityRole scanToDecideHeaderRole(); | 56 virtual AccessibilityRole scanToDecideHeaderRole(); |
| 57 | 57 |
| 58 unsigned ariaColumnIndex() const; |
| 59 unsigned ariaRowIndex() const; |
| 60 void setARIAColIndexFromRow(int index) { m_ariaColIndexFromRow = index; } |
| 61 |
| 58 protected: | 62 protected: |
| 59 virtual AXObject* parentTable() const; | 63 virtual AXObject* parentTable() const; |
| 60 AccessibilityRole determineAccessibilityRole() final; | 64 AccessibilityRole determineAccessibilityRole() final; |
| 61 | 65 |
| 62 private: | 66 private: |
| 63 bool isTableHeaderCell() const; | 67 bool isTableHeaderCell() const; |
| 64 bool isRowHeaderCell() const; | 68 bool isRowHeaderCell() const; |
| 65 bool isColumnHeaderCell() const; | 69 bool isColumnHeaderCell() const; |
| 66 | 70 |
| 67 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const final; | 71 bool computeAccessibilityIsIgnored(IgnoredReasons* = nullptr) const final; |
| 72 |
| 73 unsigned m_ariaColIndexFromRow; |
| 68 }; | 74 }; |
| 69 | 75 |
| 70 DEFINE_AX_OBJECT_TYPE_CASTS(AXTableCell, isTableCell()); | 76 DEFINE_AX_OBJECT_TYPE_CASTS(AXTableCell, isTableCell()); |
| 71 | 77 |
| 72 } // namespace blink | 78 } // namespace blink |
| 73 | 79 |
| 74 #endif // AXTableCell_h | 80 #endif // AXTableCell_h |
| OLD | NEW |