Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #545 from brave/browser-laptop-issue-13580
Browse files Browse the repository at this point in the history
Handle mouse up/down in async
  • Loading branch information
bsclifton authored Mar 26, 2018
2 parents 02621ab + 554772b commit 543de41
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions patches/master_patch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,7 @@ index 5d9a7a01faedc2a80aade71e65ca16d102f9efda..6be3c4c1f11e8f32559c408e81851363
ui::TEXT_INPUT_TYPE_NONE &&
[event type] == NSKeyDown &&
diff --git a/content/browser/renderer_host/render_widget_targeter.cc b/content/browser/renderer_host/render_widget_targeter.cc
index 40549b7e067f24731733f69440be4da97c104084..c91e4939d0bd1f6fdd67a80ebf65d964db2499f0 100644
index 40549b7e067f24731733f69440be4da97c104084..8d8dbe70d45408a2c92eb3a4b491f132aabf2056 100644
--- a/content/browser/renderer_host/render_widget_targeter.cc
+++ b/content/browser/renderer_host/render_widget_targeter.cc
@@ -5,6 +5,7 @@
Expand All @@ -1617,18 +1617,22 @@ index 40549b7e067f24731733f69440be4da97c104084..c91e4939d0bd1f6fdd67a80ebf65d964
#include "content/browser/renderer_host/input/one_shot_timeout_monitor.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
@@ -140,7 +141,9 @@ void RenderWidgetTargeter::FindTargetAndDispatch(
@@ -140,7 +141,13 @@ void RenderWidgetTargeter::FindTargetAndDispatch(
// TODO(kenrb, wjmaclean): Asynchronous hit tests don't work properly with
// GuestViews, so rely on the synchronous result.
// See https://crbug.com/802378.
- if (result.should_query_view && !target->IsRenderWidgetHostViewGuest()) {
+ // TODO(darkdh): MUON - remove this hack when we fully migrate to OOPIF from
+ // legacy guest webvie
+ if (result.should_query_view &&
+ (!target->IsRenderWidgetHostViewGuest() ||
+ event.GetType() == blink::WebInputEvent::kMouseMove)) {
+ event.GetType() == blink::WebInputEvent::kMouseMove ||
+ event.GetType() == blink::WebInputEvent::kMouseDown ||
+ event.GetType() == blink::WebInputEvent::kMouseUp)) {
// TODO(kenrb, sadrul): When all event types support asynchronous hit
// testing, we should be able to have FindTargetSynchronously return the
// view and location to use for the renderer hit test query.
@@ -152,6 +155,9 @@ void RenderWidgetTargeter::FindTargetAndDispatch(
@@ -152,6 +159,9 @@ void RenderWidgetTargeter::FindTargetAndDispatch(
} else {
FoundTarget(root_view, target, *event_ptr, latency, result.target_location);
}
Expand Down

0 comments on commit 543de41

Please sign in to comment.