| 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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 } | 985 } |
| 986 | 986 |
| 987 WebURL WebAXObject::url() const | 987 WebURL WebAXObject::url() const |
| 988 { | 988 { |
| 989 if (isDetached()) | 989 if (isDetached()) |
| 990 return WebURL(); | 990 return WebURL(); |
| 991 | 991 |
| 992 return m_private->url(); | 992 return m_private->url(); |
| 993 } | 993 } |
| 994 | 994 |
| 995 WebString WebAXObject::deprecatedAccessibilityDescription() const | |
| 996 { | |
| 997 if (isDetached()) | |
| 998 return WebString(); | |
| 999 | |
| 1000 ASSERT(isLayoutClean(m_private->document())); | |
| 1001 | |
| 1002 return m_private->deprecatedAccessibilityDescription(); | |
| 1003 } | |
| 1004 | |
| 1005 bool WebAXObject::deprecatedAriaDescribedby(WebVector<WebAXObject>& describedbyE
lements) const | |
| 1006 { | |
| 1007 if (isDetached()) | |
| 1008 return false; | |
| 1009 | |
| 1010 AXObject::AXObjectVector describedby; | |
| 1011 m_private->deprecatedAriaDescribedbyElements(describedby); | |
| 1012 | |
| 1013 WebVector<WebAXObject> result(describedby.size()); | |
| 1014 for (size_t i = 0; i < describedby.size(); i++) | |
| 1015 result[i] = WebAXObject(describedby[i]); | |
| 1016 describedbyElements.swap(result); | |
| 1017 | |
| 1018 return true; | |
| 1019 } | |
| 1020 | |
| 1021 bool WebAXObject::deprecatedAriaLabelledby(WebVector<WebAXObject>& labelledbyEle
ments) const | |
| 1022 { | |
| 1023 if (isDetached()) | |
| 1024 return false; | |
| 1025 | |
| 1026 AXObject::AXObjectVector labelledby; | |
| 1027 m_private->deprecatedAriaLabelledbyElements(labelledby); | |
| 1028 | |
| 1029 WebVector<WebAXObject> result(labelledby.size()); | |
| 1030 for (size_t i = 0; i < labelledby.size(); i++) | |
| 1031 result[i] = WebAXObject(labelledby[i]); | |
| 1032 labelledbyElements.swap(result); | |
| 1033 | |
| 1034 return true; | |
| 1035 } | |
| 1036 | |
| 1037 WebString WebAXObject::deprecatedHelpText() const | |
| 1038 { | |
| 1039 if (isDetached()) | |
| 1040 return WebString(); | |
| 1041 | |
| 1042 return m_private->deprecatedHelpText(); | |
| 1043 } | |
| 1044 | |
| 1045 WebString WebAXObject::deprecatedPlaceholder() const | |
| 1046 { | |
| 1047 if (isDetached()) | |
| 1048 return WebString(); | |
| 1049 | |
| 1050 return WebString(m_private->deprecatedPlaceholder()); | |
| 1051 } | |
| 1052 | |
| 1053 WebString WebAXObject::deprecatedTitle() const | |
| 1054 { | |
| 1055 if (isDetached()) | |
| 1056 return WebString(); | |
| 1057 | |
| 1058 ASSERT(isLayoutClean(m_private->document())); | |
| 1059 | |
| 1060 return m_private->deprecatedTitle(); | |
| 1061 } | |
| 1062 | |
| 1063 WebAXObject WebAXObject::deprecatedTitleUIElement() const | |
| 1064 { | |
| 1065 if (isDetached()) | |
| 1066 return WebAXObject(); | |
| 1067 | |
| 1068 if (!m_private->deprecatedExposesTitleUIElement()) | |
| 1069 return WebAXObject(); | |
| 1070 | |
| 1071 return WebAXObject(m_private->deprecatedTitleUIElement()); | |
| 1072 } | |
| 1073 | |
| 1074 WebString WebAXObject::accessibilityDescription() const | |
| 1075 { | |
| 1076 return deprecatedAccessibilityDescription(); | |
| 1077 } | |
| 1078 | |
| 1079 bool WebAXObject::ariaDescribedby(WebVector<WebAXObject>& describedbyElements) c
onst | |
| 1080 { | |
| 1081 return deprecatedAriaDescribedby(describedbyElements); | |
| 1082 } | |
| 1083 | |
| 1084 bool WebAXObject::ariaLabelledby(WebVector<WebAXObject>& labelledbyElements) con
st | |
| 1085 { | |
| 1086 return deprecatedAriaLabelledby(labelledbyElements); | |
| 1087 } | |
| 1088 | |
| 1089 WebString WebAXObject::helpText() const | |
| 1090 { | |
| 1091 return deprecatedHelpText(); | |
| 1092 } | |
| 1093 | |
| 1094 WebString WebAXObject::placeholder() const | |
| 1095 { | |
| 1096 return deprecatedPlaceholder(); | |
| 1097 } | |
| 1098 | |
| 1099 WebString WebAXObject::title() const | |
| 1100 { | |
| 1101 return deprecatedTitle(); | |
| 1102 } | |
| 1103 | |
| 1104 WebAXObject WebAXObject::titleUIElement() const | |
| 1105 { | |
| 1106 return deprecatedTitleUIElement(); | |
| 1107 } | |
| 1108 | |
| 1109 WebString WebAXObject::name(WebAXNameFrom& outNameFrom, WebVector<WebAXObject>&
outNameObjects) const | 995 WebString WebAXObject::name(WebAXNameFrom& outNameFrom, WebVector<WebAXObject>&
outNameObjects) const |
| 1110 { | 996 { |
| 1111 if (isDetached()) | 997 if (isDetached()) |
| 1112 return WebString(); | 998 return WebString(); |
| 1113 | 999 |
| 1114 AXNameFrom nameFrom = AXNameFromAttribute; | 1000 AXNameFrom nameFrom = AXNameFromAttribute; |
| 1115 HeapVector<Member<AXObject>> nameObjects; | 1001 HeapVector<Member<AXObject>> nameObjects; |
| 1116 WebString result = m_private->name(nameFrom, &nameObjects); | 1002 WebString result = m_private->name(nameFrom, &nameObjects); |
| 1117 outNameFrom = static_cast<WebAXNameFrom>(nameFrom); | 1003 outNameFrom = static_cast<WebAXNameFrom>(nameFrom); |
| 1118 | 1004 |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1621 m_private = object; | 1507 m_private = object; |
| 1622 return *this; | 1508 return *this; |
| 1623 } | 1509 } |
| 1624 | 1510 |
| 1625 WebAXObject::operator AXObject*() const | 1511 WebAXObject::operator AXObject*() const |
| 1626 { | 1512 { |
| 1627 return m_private.get(); | 1513 return m_private.get(); |
| 1628 } | 1514 } |
| 1629 | 1515 |
| 1630 } // namespace blink | 1516 } // namespace blink |
| OLD | NEW |