OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 } | 822 } |
823 | 823 |
824 unsigned WebAXObject::columnCount() const | 824 unsigned WebAXObject::columnCount() const |
825 { | 825 { |
826 if (isDetached()) | 826 if (isDetached()) |
827 return false; | 827 return false; |
828 | 828 |
829 if (!m_private->isAccessibilityTable()) | 829 if (!m_private->isAccessibilityTable()) |
830 return 0; | 830 return 0; |
831 | 831 |
832 return static_cast<WebCore::AccessibilityTable*>(m_private.get())->columnCou
nt(); | 832 return toAccessibilityTable(m_private.get())->columnCount(); |
833 } | 833 } |
834 | 834 |
835 unsigned WebAXObject::rowCount() const | 835 unsigned WebAXObject::rowCount() const |
836 { | 836 { |
837 if (isDetached()) | 837 if (isDetached()) |
838 return false; | 838 return false; |
839 | 839 |
840 if (!m_private->isAccessibilityTable()) | 840 if (!m_private->isAccessibilityTable()) |
841 return 0; | 841 return 0; |
842 | 842 |
843 return static_cast<WebCore::AccessibilityTable*>(m_private.get())->rowCount(
); | 843 return toAccessibilityTable(m_private.get())->rowCount(); |
844 } | 844 } |
845 | 845 |
846 WebAXObject WebAXObject::cellForColumnAndRow(unsigned column, unsigned row) cons
t | 846 WebAXObject WebAXObject::cellForColumnAndRow(unsigned column, unsigned row) cons
t |
847 { | 847 { |
848 if (isDetached()) | 848 if (isDetached()) |
849 return WebAXObject(); | 849 return WebAXObject(); |
850 | 850 |
851 if (!m_private->isAccessibilityTable()) | 851 if (!m_private->isAccessibilityTable()) |
852 return WebAXObject(); | 852 return WebAXObject(); |
853 | 853 |
854 WebCore::AccessibilityTableCell* cell = static_cast<WebCore::AccessibilityTa
ble*>(m_private.get())->cellForColumnAndRow(column, row); | 854 WebCore::AccessibilityTableCell* cell = toAccessibilityTable(m_private.get()
)->cellForColumnAndRow(column, row); |
855 return WebAXObject(static_cast<WebCore::AccessibilityObject*>(cell)); | 855 return WebAXObject(static_cast<WebCore::AccessibilityObject*>(cell)); |
856 } | 856 } |
857 | 857 |
858 WebAXObject WebAXObject::headerContainerObject() const | 858 WebAXObject WebAXObject::headerContainerObject() const |
859 { | 859 { |
860 if (isDetached()) | 860 if (isDetached()) |
861 return WebAXObject(); | 861 return WebAXObject(); |
862 | 862 |
863 if (!m_private->isAccessibilityTable()) | 863 if (!m_private->isAccessibilityTable()) |
864 return WebAXObject(); | 864 return WebAXObject(); |
865 | 865 |
866 return WebAXObject(static_cast<WebCore::AccessibilityTable*>(m_private.get()
)->headerContainer()); | 866 return WebAXObject(toAccessibilityTable(m_private.get())->headerContainer())
; |
867 } | 867 } |
868 | 868 |
869 WebAXObject WebAXObject::rowAtIndex(unsigned rowIndex) const | 869 WebAXObject WebAXObject::rowAtIndex(unsigned rowIndex) const |
870 { | 870 { |
871 if (isDetached()) | 871 if (isDetached()) |
872 return WebAXObject(); | 872 return WebAXObject(); |
873 | 873 |
874 if (!m_private->isAccessibilityTable()) | 874 if (!m_private->isAccessibilityTable()) |
875 return WebAXObject(); | 875 return WebAXObject(); |
876 | 876 |
877 const AccessibilityObject::AccessibilityChildrenVector& rows = static_cast<W
ebCore::AccessibilityTable*>(m_private.get())->rows(); | 877 const AccessibilityObject::AccessibilityChildrenVector& rows = toAccessibili
tyTable(m_private.get())->rows(); |
878 if (rowIndex < rows.size()) | 878 if (rowIndex < rows.size()) |
879 return WebAXObject(rows[rowIndex]); | 879 return WebAXObject(rows[rowIndex]); |
880 | 880 |
881 return WebAXObject(); | 881 return WebAXObject(); |
882 } | 882 } |
883 | 883 |
884 WebAXObject WebAXObject::columnAtIndex(unsigned columnIndex) const | 884 WebAXObject WebAXObject::columnAtIndex(unsigned columnIndex) const |
885 { | 885 { |
886 if (isDetached()) | 886 if (isDetached()) |
887 return WebAXObject(); | 887 return WebAXObject(); |
888 | 888 |
889 if (!m_private->isAccessibilityTable()) | 889 if (!m_private->isAccessibilityTable()) |
890 return WebAXObject(); | 890 return WebAXObject(); |
891 | 891 |
892 const AccessibilityObject::AccessibilityChildrenVector& columns = static_cas
t<WebCore::AccessibilityTable*>(m_private.get())->columns(); | 892 const AccessibilityObject::AccessibilityChildrenVector& columns = toAccessib
ilityTable(m_private.get())->columns(); |
893 if (columnIndex < columns.size()) | 893 if (columnIndex < columns.size()) |
894 return WebAXObject(columns[columnIndex]); | 894 return WebAXObject(columns[columnIndex]); |
895 | 895 |
896 return WebAXObject(); | 896 return WebAXObject(); |
897 } | 897 } |
898 | 898 |
899 unsigned WebAXObject::rowIndex() const | 899 unsigned WebAXObject::rowIndex() const |
900 { | 900 { |
901 if (isDetached()) | 901 if (isDetached()) |
902 return 0; | 902 return 0; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 m_private = object; | 1020 m_private = object; |
1021 return *this; | 1021 return *this; |
1022 } | 1022 } |
1023 | 1023 |
1024 WebAXObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>() const | 1024 WebAXObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>() const |
1025 { | 1025 { |
1026 return m_private.get(); | 1026 return m_private.get(); |
1027 } | 1027 } |
1028 | 1028 |
1029 } // namespace WebKit | 1029 } // namespace WebKit |
OLD | NEW |