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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 KURL AXImageMapLink::url() const | 94 KURL AXImageMapLink::url() const |
95 { | 95 { |
96 if (!m_areaElement.get()) | 96 if (!m_areaElement.get()) |
97 return KURL(); | 97 return KURL(); |
98 | 98 |
99 return m_areaElement->href(); | 99 return m_areaElement->href(); |
100 } | 100 } |
101 | 101 |
102 void AXImageMapLink::accessibilityText(Vector<AccessibilityText>& textOrder) | |
103 { | |
104 String description = accessibilityDescription(); | |
105 if (!description.isEmpty()) | |
106 textOrder.append(AccessibilityText(description, AlternativeText)); | |
107 | |
108 const AtomicString& titleText = getAttribute(titleAttr); | |
109 if (!titleText.isEmpty()) | |
110 textOrder.append(AccessibilityText(titleText, TitleTagText)); | |
111 | |
112 const AtomicString& summary = getAttribute(summaryAttr); | |
113 if (!summary.isEmpty()) | |
114 textOrder.append(AccessibilityText(summary, SummaryText)); | |
115 } | |
116 | |
117 String AXImageMapLink::accessibilityDescription() const | 102 String AXImageMapLink::accessibilityDescription() const |
118 { | 103 { |
119 const AtomicString& ariaLabel = getAttribute(aria_labelAttr); | 104 const AtomicString& ariaLabel = getAttribute(aria_labelAttr); |
120 if (!ariaLabel.isEmpty()) | 105 if (!ariaLabel.isEmpty()) |
121 return ariaLabel; | 106 return ariaLabel; |
122 const AtomicString& alt = getAttribute(altAttr); | 107 const AtomicString& alt = getAttribute(altAttr); |
123 if (!alt.isEmpty()) | 108 if (!alt.isEmpty()) |
124 return alt; | 109 return alt; |
125 | 110 |
126 return String(); | 111 return String(); |
(...skipping 22 matching lines...) Expand all Loading... |
149 else | 134 else |
150 renderer = m_mapElement->renderer(); | 135 renderer = m_mapElement->renderer(); |
151 | 136 |
152 if (!renderer) | 137 if (!renderer) |
153 return LayoutRect(); | 138 return LayoutRect(); |
154 | 139 |
155 return m_areaElement->computeRect(renderer); | 140 return m_areaElement->computeRect(renderer); |
156 } | 141 } |
157 | 142 |
158 } // namespace WebCore | 143 } // namespace WebCore |
OLD | NEW |