Index: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
index 90193dd816bd579273edaec8468f09823112139e..cb38acadd26c8ff4171d7fc5fe2949c022076452 100644 |
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp |
+++ b/third_party/WebKit/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; |
@@ -1578,10 +1575,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; |
} |
@@ -1604,10 +1597,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; |
} |
@@ -1692,7 +1681,6 @@ void AXLayoutObject::addChildren() |
} |
addHiddenChildren(); |
- addAttachmentChildren(); |
addPopupChildren(); |
addImageMapChildren(); |
addTextFieldChildren(); |
@@ -1805,13 +1793,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. |
// |
@@ -2284,7 +2265,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; |
@@ -2298,12 +2283,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(); |
} |
} |
@@ -2515,21 +2500,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())) |