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

Unified Diff: third_party/WebKit/Source/core/input/GestureManager.cpp

Issue 2544653002: Adding back Mouse Focus on |sendContextMenuEventForGesture| (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/GestureManager.cpp
diff --git a/third_party/WebKit/Source/core/input/GestureManager.cpp b/third_party/WebKit/Source/core/input/GestureManager.cpp
index e3ee248d3de3f43ed00f84fbe3ad602c79ef69d5..a5d589e5baf1aef5a03c2f4687c9bf225cb81542 100644
--- a/third_party/WebKit/Source/core/input/GestureManager.cpp
+++ b/third_party/WebKit/Source/core/input/GestureManager.cpp
@@ -375,6 +375,17 @@ WebInputEventResult GestureManager::sendContextMenuEventForGesture(
PlatformMouseEvent::FromTouch, WTF::monotonicallyIncreasingTime(),
WebPointerProperties::PointerType::Mouse);
+ if (!m_suppressMouseEventsFromGestures && m_frame->view()) {
+ HitTestRequest request(HitTestRequest::Active);
+ LayoutPoint documentPoint =
+ m_frame->view()->rootFrameToContents(targetedEvent.event().position());
+ MouseEventWithHitTestResults mev =
+ m_frame->document()->performMouseEventHitTest(request, documentPoint,
+ mouseEvent);
+ m_mouseEventManager->handleMouseFocus(
+ mev.hitTestResult(),
+ InputDeviceCapabilities::firesTouchEventsSourceCapabilities());
+ }
return m_frame->eventHandler().sendContextMenuEvent(mouseEvent);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698