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

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

Issue 1121473004: Expose scroll containers via accessibility APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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
« no previous file with comments | « Source/modules/accessibility/AXLayoutObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXLayoutObject.cpp
diff --git a/Source/modules/accessibility/AXLayoutObject.cpp b/Source/modules/accessibility/AXLayoutObject.cpp
index 6c92b5afa34e672b004b81c2c2a649bade9cbe72..da5215f2c2cef41e790267b1bd2a27c1f2927399 100644
--- a/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/Source/modules/accessibility/AXLayoutObject.cpp
@@ -244,9 +244,11 @@ bool AXLayoutObject::shouldNotifyActiveDescendant() const
ScrollableArea* AXLayoutObject::getScrollableAreaIfScrollable() const
{
- // If the parent is a FrameView, then this object isn't really scrollable; the parent should handle the scrolling.
+ // 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 0;
+ return parentObject()->getScrollableAreaIfScrollable();
if (!m_layoutObject || !m_layoutObject->isBox())
return 0;
@@ -748,6 +750,9 @@ bool AXLayoutObject::computeAccessibilityIsIgnored(IgnoredReasons* ignoredReason
if (!ariaAccessibilityDescription().isEmpty())
return false;
+ if (isScrollableContainer())
+ return false;
+
// By default, objects should be ignored so that the AX hierarchy is not
// filled with unnecessary items.
if (ignoredReasons)
@@ -1863,19 +1868,6 @@ void AXLayoutObject::setValue(const String& string)
toHTMLTextAreaElement(*node()).setValue(string);
}
-// FIXME: This function should use an IntSize to avoid the conversion below.
-void AXLayoutObject::scrollTo(const IntPoint& point) const
-{
- if (!m_layoutObject || !m_layoutObject->isBox())
- return;
-
- LayoutBox* box = toLayoutBox(m_layoutObject);
- if (!box->canBeScrolledAndHasScrollableArea())
- return;
-
- box->scrollToOffset(IntSize(point.x(), point.y()));
-}
-
//
// Notifications that this object may have changed.
//
« no previous file with comments | « Source/modules/accessibility/AXLayoutObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698