| Index: Source/core/accessibility/AXListBox.cpp
|
| diff --git a/Source/core/accessibility/AXListBox.cpp b/Source/core/accessibility/AXListBox.cpp
|
| index 432302b6c8c5f40d578fad7690b343ce762e8c1a..4b32c57447cffae0b3bfb8908b701053d8271698 100644
|
| --- a/Source/core/accessibility/AXListBox.cpp
|
| +++ b/Source/core/accessibility/AXListBox.cpp
|
| @@ -53,66 +53,4 @@ PassRefPtr<AXListBox> AXListBox::create(RenderObject* renderer)
|
| return adoptRef(new AXListBox(renderer));
|
| }
|
|
|
| -void AXListBox::addChildren()
|
| -{
|
| - Node* selectNode = m_renderer->node();
|
| - if (!selectNode)
|
| - return;
|
| -
|
| - m_haveChildren = true;
|
| -
|
| - const WillBeHeapVector<RawPtrWillBeMember<HTMLElement> >& listItems = toHTMLSelectElement(selectNode)->listItems();
|
| - unsigned length = listItems.size();
|
| - for (unsigned i = 0; i < length; i++) {
|
| - // The cast to HTMLElement below is safe because the only other possible listItem type
|
| - // would be a WMLElement, but WML builds don't use accessibility features at all.
|
| - AXObject* listOption = listBoxOptionAXObject(listItems[i]);
|
| - if (listOption && !listOption->accessibilityIsIgnored())
|
| - m_children.append(listOption);
|
| - }
|
| -}
|
| -
|
| -AXObject* AXListBox::listBoxOptionAXObject(HTMLElement* element) const
|
| -{
|
| - // skip hr elements
|
| - if (!element || isHTMLHRElement(*element))
|
| - return 0;
|
| -
|
| - AXObject* listBoxObject = m_renderer->document().axObjectCache()->getOrCreate(ListBoxOptionRole);
|
| - toAXListBoxOption(listBoxObject)->setHTMLElement(element);
|
| -
|
| - return listBoxObject;
|
| -}
|
| -
|
| -AXObject* AXListBox::elementAccessibilityHitTest(const IntPoint& point) const
|
| -{
|
| - // the internal HTMLSelectElement methods for returning a listbox option at a point
|
| - // ignore optgroup elements.
|
| - if (!m_renderer)
|
| - return 0;
|
| -
|
| - Node* node = m_renderer->node();
|
| - if (!node)
|
| - return 0;
|
| -
|
| - LayoutRect parentRect = elementRect();
|
| -
|
| - AXObject* listBoxOption = 0;
|
| - unsigned length = m_children.size();
|
| - for (unsigned i = 0; i < length; i++) {
|
| - LayoutRect rect = toRenderListBox(m_renderer)->itemBoundingBoxRect(parentRect.location(), i);
|
| - // The cast to HTMLElement below is safe because the only other possible listItem type
|
| - // would be a WMLElement, but WML builds don't use accessibility features at all.
|
| - if (rect.contains(point)) {
|
| - listBoxOption = m_children[i].get();
|
| - break;
|
| - }
|
| - }
|
| -
|
| - if (listBoxOption && !listBoxOption->accessibilityIsIgnored())
|
| - return listBoxOption;
|
| -
|
| - return axObjectCache()->getOrCreate(m_renderer);
|
| -}
|
| -
|
| } // namespace WebCore
|
|
|