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

Unified Diff: Source/core/accessibility/AXObjectCache.cpp

Issue 662913002: Fire accessible event on web area object when scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@scroll_again
Patch Set: Update tests based on change Created 6 years, 2 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 | « LayoutTests/accessibility/scroll-window-sends-notification-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXObjectCache.cpp
diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp
index 84690ec231d1b3f44ff9a9f073281104debfb9d7..d1e8b4cee62656113ea68e057416ac1095d61232 100644
--- a/Source/core/accessibility/AXObjectCache.cpp
+++ b/Source/core/accessibility/AXObjectCache.cpp
@@ -1036,9 +1036,13 @@ void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode)
postPlatformNotification(AXObject::firstAccessibleObjectFromNode(anchorNode), AXScrolledToAnchor);
}
-void AXObjectCache::handleScrollPositionChanged(FrameView* scrollView)
+void AXObjectCache::handleScrollPositionChanged(FrameView* frameView)
{
- postPlatformNotification(getOrCreate(scrollView), AXScrollPositionChanged);
+ // Prefer to fire the scroll position changed event on the frame view's child web area, if possible.
+ AXObject* targetAXObject = getOrCreate(frameView);
+ if (targetAXObject && !targetAXObject->children().isEmpty())
+ targetAXObject = targetAXObject->children()[0].get();
+ postPlatformNotification(targetAXObject, AXScrollPositionChanged);
}
void AXObjectCache::handleScrollPositionChanged(RenderObject* renderObject)
« no previous file with comments | « LayoutTests/accessibility/scroll-window-sends-notification-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698