| 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 15 matching lines...) Expand all Loading... |
| 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #ifndef AXTableCell_h | 29 #ifndef AXTableCell_h |
| 30 #define AXTableCell_h | 30 #define AXTableCell_h |
| 31 | 31 |
| 32 #include "modules/accessibility/AXRenderObject.h" | 32 #include "modules/accessibility/AXRenderObject.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class AXObjectCache; |
| 37 |
| 36 class AXTableCell : public AXRenderObject { | 38 class AXTableCell : public AXRenderObject { |
| 37 | 39 |
| 38 protected: | 40 protected: |
| 39 explicit AXTableCell(RenderObject*); | 41 AXTableCell(RenderObject*, AXObjectCache*); |
| 40 public: | 42 public: |
| 41 static PassRefPtr<AXTableCell> create(RenderObject*); | 43 static PassRefPtr<AXTableCell> create(RenderObject*, AXObjectCache*); |
| 42 virtual ~AXTableCell(); | 44 virtual ~AXTableCell(); |
| 43 | 45 |
| 44 virtual bool isTableCell() const override final; | 46 virtual bool isTableCell() const override final; |
| 45 | 47 |
| 46 // fills in the start location and row span of cell | 48 // fills in the start location and row span of cell |
| 47 virtual void rowIndexRange(pair<unsigned, unsigned>& rowRange); | 49 virtual void rowIndexRange(pair<unsigned, unsigned>& rowRange); |
| 48 // fills in the start location and column span of cell | 50 // fills in the start location and column span of cell |
| 49 virtual void columnIndexRange(pair<unsigned, unsigned>& columnRange); | 51 virtual void columnIndexRange(pair<unsigned, unsigned>& columnRange); |
| 50 | 52 |
| 51 protected: | 53 protected: |
| 52 virtual AXObject* parentTable() const; | 54 virtual AXObject* parentTable() const; |
| 53 int m_rowIndex; | 55 int m_rowIndex; |
| 54 virtual AccessibilityRole determineAccessibilityRole() override final; | 56 virtual AccessibilityRole determineAccessibilityRole() override final; |
| 55 | 57 |
| 56 private: | 58 private: |
| 57 // If a table cell is not exposed as a table cell, a TH element can serve as
its title UI element. | 59 // If a table cell is not exposed as a table cell, a TH element can serve as
its title UI element. |
| 58 virtual AXObject* titleUIElement() const override final; | 60 virtual AXObject* titleUIElement() const override final; |
| 59 virtual bool exposesTitleUIElement() const override final { return true; } | 61 virtual bool exposesTitleUIElement() const override final { return true; } |
| 60 virtual bool computeAccessibilityIsIgnored() const override final; | 62 virtual bool computeAccessibilityIsIgnored() const override final; |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 DEFINE_AX_OBJECT_TYPE_CASTS(AXTableCell, isTableCell()); | 65 DEFINE_AX_OBJECT_TYPE_CASTS(AXTableCell, isTableCell()); |
| 64 | 66 |
| 65 } // namespace blink | 67 } // namespace blink |
| 66 | 68 |
| 67 #endif // AXTableCell_h | 69 #endif // AXTableCell_h |
| OLD | NEW |