Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 1761633002: One accessibility tree per frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix is-richly-editable test Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 37efbf48213c019d074c6e3120cad4b1a1f2b88a..86546882b36b5664ced2e8d9d53b565660b2fcc4 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
@@ -1535,14 +1535,9 @@ AXObject* AXLayoutObject::computeParent() const
if (parentObj)
return axObjectCache().getOrCreate(parentObj);
- // A WebArea's parent should be the containing frame (if local) or page popup owner.
+ // A WebArea's parent should be the page popup owner, if any, otherwise null.
if (isWebArea()) {
LocalFrame* frame = m_layoutObject->frame();
- if (frame->owner() && frame->owner()->isLocal()) {
- HTMLFrameOwnerElement* owner = toHTMLFrameOwnerElement(frame->owner());
- if (owner && owner->layoutObject())
- return axObjectCache().getOrCreate(owner->layoutObject());
- }
return axObjectCache().getOrCreate(frame->pagePopupOwner());
}
@@ -1568,14 +1563,9 @@ AXObject* AXLayoutObject::computeParentIfExists() const
if (parentObj)
return axObjectCache().get(parentObj);
- // A WebArea's parent should be the containing frame (if local) or page popup owner.
+ // A WebArea's parent should be the page popup owner, if any, otherwise null.
if (isWebArea()) {
LocalFrame* frame = m_layoutObject->frame();
- if (frame->owner() && frame->owner()->isLocal()) {
- HTMLFrameOwnerElement* owner = toHTMLFrameOwnerElement(frame->owner());
- if (owner && owner->layoutObject())
- return axObjectCache().get(owner->layoutObject());
- }
return axObjectCache().get(frame->pagePopupOwner());
}
@@ -1666,7 +1656,6 @@ void AXLayoutObject::addChildren()
}
addHiddenChildren();
- addFrameChildren();
addPopupChildren();
addImageMapChildren();
addTextFieldChildren();
@@ -2455,24 +2444,6 @@ void AXLayoutObject::addCanvasChildren()
AXNodeObject::addChildren();
}
-void AXLayoutObject::addFrameChildren()
-{
- if (!m_layoutObject || !m_layoutObject->isLayoutPart())
- return;
-
- Widget* widget = toLayoutPart(m_layoutObject)->widget();
- if (!widget || !widget->isFrameView())
- return;
-
- Document* doc = toFrameView(widget)->frame().document();
- if (!doc || !doc->layoutView())
- return;
-
- AXObject* axChildFrame = axObjectCache().getOrCreate(doc);
- if (!axChildFrame->accessibilityIsIgnored())
- m_children.append(axChildFrame);
-}
-
void AXLayoutObject::addPopupChildren()
{
if (!isHTMLInputElement(getNode()))

Powered by Google App Engine
This is Rietveld 408576698