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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1375703002: Fire accessibility hover events when the touch exploration flag is set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use asserts instead of checks in test Created 5 years, 3 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 | « third_party/WebKit/Source/web/AssertMatchingEnums.cpp ('k') | third_party/WebKit/public/web/WebAXEnums.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index a20c4c51ab3c0c1208d5c916a971d4eb0e729c4e..6f670d37d17c972cad3066e025735e459336c8ef 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2086,6 +2086,29 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
return true;
}
+ if (inputEvent.modifiers & WebInputEvent::IsTouchAccessibility
+ && WebInputEvent::isMouseEventType(inputEvent.type)) {
+ PlatformMouseEventBuilder pme(mainFrameImpl()->frameView(), static_cast<const WebMouseEvent&>(inputEvent));
+
+ // Find the right target frame. See issue 1186900.
+ HitTestResult result = hitTestResultForRootFramePos(pme.position());
+ Frame* targetFrame;
+ if (result.innerNodeOrImageMapImage())
+ targetFrame = result.innerNodeOrImageMapImage()->document().frame();
+ else
+ targetFrame = m_page->focusController().focusedOrMainFrame();
+
+ if (targetFrame->isLocalFrame()) {
+ LocalFrame* targetLocalFrame = toLocalFrame(targetFrame);
+ Document* document = targetLocalFrame->document();
+ if (document) {
+ AXObjectCache* cache = document->existingAXObjectCache();
+ if (cache)
+ cache->onTouchAccessibilityHover(pme.position());
+ }
+ }
+ }
+
// Report the event to be NOT processed by WebKit, so that the browser can handle it appropriately.
if (m_ignoreInputEvents)
return false;
« no previous file with comments | « third_party/WebKit/Source/web/AssertMatchingEnums.cpp ('k') | third_party/WebKit/public/web/WebAXEnums.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698