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

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

Issue 2713193003: Added a quick heuristic to determine which objects are the target of in-page links and stop ignorin… (Closed)
Patch Set: Fixed Android test. Created 3 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/AXObjectCacheImpl.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
index 6d22ed9619cb51ce4cbd3df7604fcca51d3b130a..70ac5ffad5d5ffda8a71e84f9e130a3f728caa10 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
@@ -1177,10 +1177,14 @@ void AXObjectCacheImpl::handleLayoutComplete(Document* document) {
}
void AXObjectCacheImpl::handleScrolledToAnchor(const Node* anchorNode) {
- // The anchor node may not be accessible. Post the notification for the
- // first accessible object.
- postPlatformNotification(firstAccessibleObjectFromNode(anchorNode),
- AXScrolledToAnchor);
+ if (!anchorNode)
+ return;
+ AXObject* obj = getOrCreate(anchorNode->layoutObject());
+ if (!obj)
+ return;
+ if (obj->accessibilityIsIgnored())
+ obj = obj->parentObjectUnignored();
+ postPlatformNotification(obj, AXScrolledToAnchor);
}
void AXObjectCacheImpl::handleScrollPositionChanged(FrameView* frameView) {

Powered by Google App Engine
This is Rietveld 408576698