Index: Source/modules/accessibility/AXLayoutObject.cpp |
diff --git a/Source/modules/accessibility/AXLayoutObject.cpp b/Source/modules/accessibility/AXLayoutObject.cpp |
index 2b9b964238688d15094f2b9fa69d7bfa6ef5b3c7..fdd350e30249b63a208e65b4a8ec6bd06a35faca 100644 |
--- a/Source/modules/accessibility/AXLayoutObject.cpp |
+++ b/Source/modules/accessibility/AXLayoutObject.cpp |
@@ -247,11 +247,8 @@ bool AXLayoutObject::shouldNotifyActiveDescendant() const |
ScrollableArea* AXLayoutObject::getScrollableAreaIfScrollable() const |
{ |
- // FIXME(dmazzoni): the plan is to get rid of AXScrollView, but until |
- // this is done, a WebArea delegates its scrolling to its parent scroll view. |
- // http://crbug.com/484878 |
- if (parentObject() && parentObject()->isAXScrollView()) |
- return parentObject()->getScrollableAreaIfScrollable(); |
+ if (isWebArea()) |
+ return documentFrameView(); |
if (!m_layoutObject || !m_layoutObject->isBox()) |
return 0; |
@@ -1602,10 +1599,6 @@ AXObject* AXLayoutObject::computeParent() const |
if (parentObj) |
return axObjectCache().getOrCreate(parentObj); |
- // WebArea's parent should be the scroll view containing it. |
- if (isWebArea()) |
- return axObjectCache().getOrCreate(m_layoutObject->frame()->view()); |
- |
return 0; |
} |
@@ -1628,10 +1621,6 @@ AXObject* AXLayoutObject::computeParentIfExists() const |
if (parentObj) |
return axObjectCache().get(parentObj); |
- // WebArea's parent should be the scroll view containing it. |
- if (isWebArea()) |
- return axObjectCache().get(m_layoutObject->frame()->view()); |
- |
return 0; |
} |
@@ -1716,7 +1705,6 @@ void AXLayoutObject::addChildren() |
} |
addHiddenChildren(); |
- addAttachmentChildren(); |
addPopupChildren(); |
addImageMapChildren(); |
addTextFieldChildren(); |
@@ -1829,13 +1817,6 @@ Element* AXLayoutObject::anchorElement() const |
return 0; |
} |
-Widget* AXLayoutObject::widgetForAttachmentView() const |
-{ |
- if (!isAttachment()) |
- return 0; |
- return toLayoutPart(m_layoutObject)->widget(); |
-} |
- |
// |
// Functions that retrieve the current selection. |
// |
@@ -2308,7 +2289,11 @@ bool AXLayoutObject::isTabItemSelected() const |
// The ARIA spec says a tab item can also be selected if it is aria-labeled by a tabpanel |
// that has keyboard focus inside of it, or if a tabpanel in its aria-controls list has KB |
// focus inside of it. |
- AXObject* focusedElement = focusedUIElement(); |
+ Document* doc = document(); |
+ if (!doc) |
+ return false; |
+ |
+ Element* focusedElement = doc->activeElement(); |
if (!focusedElement) |
return false; |
@@ -2322,12 +2307,12 @@ bool AXLayoutObject::isTabItemSelected() const |
if (!tabPanel || tabPanel->roleValue() != TabPanelRole) |
continue; |
- AXObject* checkFocusElement = focusedElement; |
+ Element* checkFocusElement = focusedElement; |
// Check if the focused element is a descendant of the element controlled by the tab item. |
while (checkFocusElement) { |
- if (tabPanel == checkFocusElement) |
+ if (tabPanel->node() == checkFocusElement) |
return true; |
- checkFocusElement = checkFocusElement->parentObject(); |
+ checkFocusElement = checkFocusElement->parentElement(); |
} |
} |
@@ -2539,21 +2524,6 @@ void AXLayoutObject::addCanvasChildren() |
AXNodeObject::addChildren(); |
} |
-void AXLayoutObject::addAttachmentChildren() |
-{ |
- if (!isAttachment()) |
- return; |
- |
- // FrameView's need to be inserted into the AX hierarchy when encountered. |
- Widget* widget = widgetForAttachmentView(); |
- if (!widget || !widget->isFrameView()) |
- return; |
- |
- AXObject* axWidget = axObjectCache().getOrCreate(widget); |
- if (!axWidget->accessibilityIsIgnored()) |
- m_children.append(axWidget); |
-} |
- |
void AXLayoutObject::addPopupChildren() |
{ |
if (!isHTMLInputElement(node())) |