| 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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 } | 869 } |
| 870 | 870 |
| 871 if (m_renderer->isText()) | 871 if (m_renderer->isText()) |
| 872 return textUnderElement(); | 872 return textUnderElement(); |
| 873 | 873 |
| 874 if (cssBox && cssBox->isMenuList()) { | 874 if (cssBox && cssBox->isMenuList()) { |
| 875 // RenderMenuList will go straight to the text() of its selected item. | 875 // RenderMenuList will go straight to the text() of its selected item. |
| 876 // This has to be overridden in the case where the selected item has an
ARIA label. | 876 // This has to be overridden in the case where the selected item has an
ARIA label. |
| 877 HTMLSelectElement* selectElement = toHTMLSelectElement(m_renderer->node(
)); | 877 HTMLSelectElement* selectElement = toHTMLSelectElement(m_renderer->node(
)); |
| 878 int selectedIndex = selectElement->selectedIndex(); | 878 int selectedIndex = selectElement->selectedIndex(); |
| 879 const Vector<HTMLElement*> listItems = selectElement->listItems(); | 879 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement> >& listItems = se
lectElement->listItems(); |
| 880 if (selectedIndex >= 0 && static_cast<size_t>(selectedIndex) < listItems
.size()) { | 880 if (selectedIndex >= 0 && static_cast<size_t>(selectedIndex) < listItems
.size()) { |
| 881 const AtomicString& overriddenDescription = listItems[selectedIndex]
->fastGetAttribute(aria_labelAttr); | 881 const AtomicString& overriddenDescription = listItems[selectedIndex]
->fastGetAttribute(aria_labelAttr); |
| 882 if (!overriddenDescription.isNull()) | 882 if (!overriddenDescription.isNull()) |
| 883 return overriddenDescription; | 883 return overriddenDescription; |
| 884 } | 884 } |
| 885 return toRenderMenuList(m_renderer)->text(); | 885 return toRenderMenuList(m_renderer)->text(); |
| 886 } | 886 } |
| 887 | 887 |
| 888 if (m_renderer->isListMarker()) | 888 if (m_renderer->isListMarker()) |
| 889 return toRenderListMarker(m_renderer)->text(); | 889 return toRenderListMarker(m_renderer)->text(); |
| (...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2307 if (label && label->renderer()) { | 2307 if (label && label->renderer()) { |
| 2308 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2308 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
| 2309 result.unite(labelRect); | 2309 result.unite(labelRect); |
| 2310 } | 2310 } |
| 2311 } | 2311 } |
| 2312 | 2312 |
| 2313 return result; | 2313 return result; |
| 2314 } | 2314 } |
| 2315 | 2315 |
| 2316 } // namespace WebCore | 2316 } // namespace WebCore |
| OLD | NEW |