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

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

Issue 1564863002: Get rid of AXScrollView and AXScrollbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump_oopif_3
Patch Set: Fix Android expectation Created 4 years, 11 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/AXObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index 2a0e968b1879eda438991ec206ec00a34afa3c78..ad99423f037ca1463cf3a6cc0746640bad156c2a 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -1109,18 +1109,16 @@ IntRect AXObject::boundingBoxForQuads(LayoutObject* obj, const Vector<FloatQuad>
AXObject* AXObject::elementAccessibilityHitTest(const IntPoint& point) const
{
- // Send the hit test back into the sub-frame if necessary.
- if (isAttachment()) {
- Widget* widget = widgetForAttachmentView();
- // Normalize the point for the widget's bounds.
- if (widget && widget->isFrameView())
- return axObjectCache().getOrCreate(widget)->accessibilityHitTest(IntPoint(point - widget->frameRect().location()));
- }
-
- // Check if there are any mock elements that need to be handled.
+ // Check if there are any mock elements or child frames that need to be handled.
for (const auto& child : m_children) {
if (child->isMockObject() && child->elementRect().contains(point))
return child->elementAccessibilityHitTest(point);
+
+ if (child->isWebArea()) {
+ FrameView* frameView = child->documentFrameView();
+ if (frameView)
+ return child->accessibilityHitTest(IntPoint(point - frameView->frameRect().location()));
+ }
}
return const_cast<AXObject*>(this);
@@ -1427,7 +1425,7 @@ void AXObject::scrollToMakeVisibleWithSubFocus(const IntRect& subfocus) const
ScrollableArea* scrollableArea = 0;
while (scrollParent) {
scrollableArea = scrollParent->getScrollableAreaIfScrollable();
- if (scrollableArea && !scrollParent->isAXScrollView())
+ if (scrollableArea)
break;
scrollParent = scrollParent->parentObject();
}
@@ -1476,7 +1474,7 @@ void AXObject::scrollToGlobalPoint(const IntPoint& globalPoint) const
HeapVector<Member<const AXObject>> objects;
AXObject* parentObject;
for (parentObject = this->parentObject(); parentObject; parentObject = parentObject->parentObject()) {
- if (parentObject->getScrollableAreaIfScrollable() && !parentObject->isAXScrollView())
+ if (parentObject->getScrollableAreaIfScrollable())
objects.prepend(parentObject);
}
objects.append(this);

Powered by Google App Engine
This is Rietveld 408576698