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

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

Issue 2009283002: Fix touch accessibility events in WebViews and iframes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable cross-site test temporarily Created 4 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
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 efc395d5be6f97e2746000332fbf7d235d760db8..04665908c780aa40d172987127d380aa1fcc186f 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
@@ -1252,8 +1252,15 @@ String AXObjectCacheImpl::computedNameForNode(Node* node)
void AXObjectCacheImpl::onTouchAccessibilityHover(const IntPoint& location)
{
AXObject* hit = root()->accessibilityHitTest(location);
- if (hit)
+ if (hit) {
+ // Ignore events on a frame or plug-in, because the touch events
+ // will be re-targeted there and we don't want to fire duplicate
+ // accessibility events.
+ if (hit->getLayoutObject() && hit->getLayoutObject()->isLayoutPart())
+ return;
+
postPlatformNotification(hit, AXHover);
+ }
}
void AXObjectCacheImpl::setCanvasObjectBounds(Element* element, const LayoutRect& rect)

Powered by Google App Engine
This is Rietveld 408576698