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

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

Issue 2036493002: Handle touch accessibility in PageWidgetDelegate instead of WebViewImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@touch_exploration_test
Patch Set: 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/web/PageWidgetDelegate.cpp
diff --git a/third_party/WebKit/Source/web/PageWidgetDelegate.cpp b/third_party/WebKit/Source/web/PageWidgetDelegate.cpp
index 8f9aabd6feca52b00547877e86579daa868176d8..7148db8a82175412c169caeee6035e7b79dfa54f 100644
--- a/third_party/WebKit/Source/web/PageWidgetDelegate.cpp
+++ b/third_party/WebKit/Source/web/PageWidgetDelegate.cpp
@@ -108,6 +108,23 @@ void PageWidgetDelegate::paintIgnoringCompositing(Page& page, WebCanvas* canvas,
WebInputEventResult PageWidgetDelegate::handleInputEvent(PageWidgetEventHandler& handler, const WebInputEvent& event, LocalFrame* root)
{
+ if (event.modifiers & WebInputEvent::IsTouchAccessibility
+ && WebInputEvent::isMouseEventType(event.type)) {
+ PlatformMouseEventBuilder pme(root->view(), static_cast<const WebMouseEvent&>(event));
+
+ IntPoint docPoint(root->view()->rootFrameToContents(pme.position()));
+ HitTestResult result = root->eventHandler().hitTestResultAtPoint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
+ result.setToShadowHostIfInUserAgentShadowRoot();
+ if (result.innerNodeFrame()) {
+ Document* document = result.innerNodeFrame()->document();
+ if (document) {
+ AXObjectCache* cache = document->existingAXObjectCache();
+ if (cache)
+ cache->onTouchAccessibilityHover(result.roundedPointInInnerNodeFrame());
+ }
+ }
+ }
+
switch (event.type) {
// FIXME: WebKit seems to always return false on mouse events processing
« no previous file with comments | « content/browser/accessibility/touch_accessibility_aura_browsertest.cc ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698