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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 { | 77 { |
78 AXObjectCache::enableAccessibility(); | 78 AXObjectCache::enableAccessibility(); |
79 } | 79 } |
80 | 80 |
81 // static | 81 // static |
82 bool WebAccessibilityObject::accessibilityEnabled() | 82 bool WebAccessibilityObject::accessibilityEnabled() |
83 { | 83 { |
84 return AXObjectCache::accessibilityEnabled(); | 84 return AXObjectCache::accessibilityEnabled(); |
85 } | 85 } |
86 | 86 |
| 87 // static |
| 88 void WebAccessibilityObject::enableInlineTextBoxAccessibility() |
| 89 { |
| 90 AXObjectCache::setInlineTextBoxAccessibility(true); |
| 91 } |
| 92 |
87 void WebAccessibilityObject::startCachingComputedObjectAttributesUntilTreeMutate
s() | 93 void WebAccessibilityObject::startCachingComputedObjectAttributesUntilTreeMutate
s() |
88 { | 94 { |
89 m_private->axObjectCache()->startCachingComputedObjectAttributesUntilTreeMut
ates(); | 95 m_private->axObjectCache()->startCachingComputedObjectAttributesUntilTreeMut
ates(); |
90 } | 96 } |
91 | 97 |
92 void WebAccessibilityObject::stopCachingComputedObjectAttributes() | 98 void WebAccessibilityObject::stopCachingComputedObjectAttributes() |
93 { | 99 { |
94 m_private->axObjectCache()->stopCachingComputedObjectAttributes(); | 100 m_private->axObjectCache()->stopCachingComputedObjectAttributes(); |
95 } | 101 } |
96 | 102 |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 return 0; | 1000 return 0; |
995 | 1001 |
996 if (!m_private->isTableCell()) | 1002 if (!m_private->isTableCell()) |
997 return 0; | 1003 return 0; |
998 | 1004 |
999 pair<unsigned, unsigned> rowRange; | 1005 pair<unsigned, unsigned> rowRange; |
1000 static_cast<WebCore::AccessibilityTableCell*>(m_private.get())->rowIndexRang
e(rowRange); | 1006 static_cast<WebCore::AccessibilityTableCell*>(m_private.get())->rowIndexRang
e(rowRange); |
1001 return rowRange.second; | 1007 return rowRange.second; |
1002 } | 1008 } |
1003 | 1009 |
| 1010 void WebAccessibilityObject::characterOffsets(WebVector<int>& offsets) const |
| 1011 { |
| 1012 if (isDetached()) |
| 1013 return; |
| 1014 |
| 1015 Vector<int> offsetsVector; |
| 1016 m_private->textCharacterOffsets(offsetsVector); |
| 1017 |
| 1018 size_t vectorSize = offsetsVector.size(); |
| 1019 WebVector<int> offsetsWebVector(vectorSize); |
| 1020 for (size_t i = 0; i < vectorSize; i++) |
| 1021 offsetsWebVector[i] = offsetsVector[i]; |
| 1022 offsets.swap(offsetsWebVector); |
| 1023 } |
| 1024 |
| 1025 void WebAccessibilityObject::wordBoundaries(WebVector<int>& starts, WebVector<in
t>& ends) const |
| 1026 { |
| 1027 if (isDetached()) |
| 1028 return; |
| 1029 |
| 1030 Vector<int> startsVector; |
| 1031 Vector<int> endsVector; |
| 1032 m_private->wordBoundaries(startsVector, endsVector); |
| 1033 |
| 1034 size_t vectorSize = startsVector.size(); |
| 1035 ASSERT(endsVector.size() == vectorSize); |
| 1036 WebVector<int> startsWebVector(vectorSize); |
| 1037 WebVector<int> endsWebVector(vectorSize); |
| 1038 for (size_t i = 0; i < vectorSize; i++) { |
| 1039 startsWebVector[i] = startsVector[i]; |
| 1040 endsWebVector[i] = endsVector[i]; |
| 1041 } |
| 1042 starts.swap(startsWebVector); |
| 1043 ends.swap(endsWebVector); |
| 1044 } |
| 1045 |
1004 void WebAccessibilityObject::scrollToMakeVisible() const | 1046 void WebAccessibilityObject::scrollToMakeVisible() const |
1005 { | 1047 { |
1006 if (!isDetached()) | 1048 if (!isDetached()) |
1007 m_private->scrollToMakeVisible(); | 1049 m_private->scrollToMakeVisible(); |
1008 } | 1050 } |
1009 | 1051 |
1010 void WebAccessibilityObject::scrollToMakeVisibleWithSubFocus(const WebRect& subf
ocus) const | 1052 void WebAccessibilityObject::scrollToMakeVisibleWithSubFocus(const WebRect& subf
ocus) const |
1011 { | 1053 { |
1012 if (!isDetached()) | 1054 if (!isDetached()) |
1013 m_private->scrollToMakeVisibleWithSubFocus(subfocus); | 1055 m_private->scrollToMakeVisibleWithSubFocus(subfocus); |
(...skipping 15 matching lines...) Expand all Loading... |
1029 m_private = object; | 1071 m_private = object; |
1030 return *this; | 1072 return *this; |
1031 } | 1073 } |
1032 | 1074 |
1033 WebAccessibilityObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>()
const | 1075 WebAccessibilityObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>()
const |
1034 { | 1076 { |
1035 return m_private.get(); | 1077 return m_private.get(); |
1036 } | 1078 } |
1037 | 1079 |
1038 } // namespace WebKit | 1080 } // namespace WebKit |
OLD | NEW |