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) |