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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.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, 6 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/PageWidgetDelegate.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 return WebInputEventResult::HandledSuppressed; 2183 return WebInputEventResult::HandledSuppressed;
2184 2184
2185 if (m_devToolsEmulator->handleInputEvent(inputEvent)) 2185 if (m_devToolsEmulator->handleInputEvent(inputEvent))
2186 return WebInputEventResult::HandledSuppressed; 2186 return WebInputEventResult::HandledSuppressed;
2187 2187
2188 if (InspectorOverlay* overlay = inspectorOverlay()) { 2188 if (InspectorOverlay* overlay = inspectorOverlay()) {
2189 if (overlay->handleInputEvent(inputEvent)) 2189 if (overlay->handleInputEvent(inputEvent))
2190 return WebInputEventResult::HandledSuppressed; 2190 return WebInputEventResult::HandledSuppressed;
2191 } 2191 }
2192 2192
2193 if (inputEvent.modifiers & WebInputEvent::IsTouchAccessibility
2194 && WebInputEvent::isMouseEventType(inputEvent.type)) {
2195 PlatformMouseEventBuilder pme(mainFrameImpl()->frameView(), static_cast< const WebMouseEvent&>(inputEvent));
2196
2197 // Find the right target frame. See issue 1186900.
2198 HitTestResult result = hitTestResultForRootFramePos(pme.position());
2199 if (result.innerNodeFrame()) {
2200 Document* document = result.innerNodeFrame()->document();
2201 if (document) {
2202 AXObjectCache* cache = document->existingAXObjectCache();
2203 if (cache)
2204 cache->onTouchAccessibilityHover(result.roundedPointInInnerN odeFrame());
2205 }
2206 }
2207 }
2208
2209 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately. 2193 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately.
2210 if (m_ignoreInputEvents) 2194 if (m_ignoreInputEvents)
2211 return WebInputEventResult::NotHandled; 2195 return WebInputEventResult::NotHandled;
2212 2196
2213 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent , &inputEvent); 2197 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent , &inputEvent);
2214 UIEventWithKeyState::clearNewTabModifierSetFromIsolatedWorld(); 2198 UIEventWithKeyState::clearNewTabModifierSetFromIsolatedWorld();
2215 2199
2216 if (isPointerLocked() && WebInputEvent::isMouseEventType(inputEvent.type)) { 2200 if (isPointerLocked() && WebInputEvent::isMouseEventType(inputEvent.type)) {
2217 pointerLockMouseEvent(inputEvent); 2201 pointerLockMouseEvent(inputEvent);
2218 return WebInputEventResult::HandledSystem; 2202 return WebInputEventResult::HandledSystem;
(...skipping 2371 matching lines...) Expand 10 before | Expand all | Expand 10 after
4590 { 4574 {
4591 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4575 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4592 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4576 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4593 if (!page()) 4577 if (!page())
4594 return 1; 4578 return 1;
4595 4579
4596 return page()->deviceScaleFactor(); 4580 return page()->deviceScaleFactor();
4597 } 4581 }
4598 4582
4599 } // namespace blink 4583 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PageWidgetDelegate.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698