Hi James,
I'm trying to debug a problem [1] with mouse wheel scrolling of the PDF plugin in a Chromium-derived application that uses a custom RenderWidgetHostView implementation for the main view. Specifically, I'm running into this condition that you added to BrowserPlugin::HandleInputEvent in
https://crrev.com/1bbc9fc2:
// With direct event routing turned on, BrowserPlugin should almost never
// see wheel events any more. The two exceptions are (1) scroll bubbling, and
// (2) synthetic mouse wheels generated by touchpad GesturePinch events on
// Mac, which always go to the mainframe and thus may hit BrowserPlugin if
// it's in a top-level embedder. In both cases we should indicate the event
// as not handled (for GesturePinch on Mac, indicating the event has been
// handled leads to touchpad pinch not working).
if (event.GetType() == blink::WebInputEvent::kMouseWheel)
return blink::WebInputEventResult::kNotHandled;
The application currently synthesizes a blink::WebMouseWheelEvent and calls ForwardWheelEvent on the RenderWidgetHostImpl owned by the RenderWidgetHostViewGuest. Adding some breakpoints I see that the following methods are being called in order:
RenderWidgetHostImpl::ForwardWheelEvent
MouseWheelEventQueue::TryForwardNextEventToRenderer
-> event_sent_for_gesture_ack_.GetType() == kMouseWheel
MouseWheelEventQueue::ProcessMouseWheelAck
RenderWidgetHostViewGuest::WheelEventAck
BrowserPluginGuest::ResendEventToEmbedder
RenderWidgetHostImpl::ForwardWheelEventWithLatencyInfo
MouseWheelEventQueue::TryForwardNextEventToRenderer
-> event_sent_for_gesture_ack_.GetType() == kMouseWheel
MouseWheelEventQueue::SendScrollBegin
BrowserPlugin::HandleInputEvent
-> returns kNotHandled
WebPluginContainerImpl::HandleGestureEvent
-> event.GetType() == kGestureScrollUpdate
MouseWheelEventQueue::ProcessMouseWheelAck
PepperWebPluginImpl::HandleInputEvent
-> returns false due to event_class == 0
Can you explain what "direct event routing" means, and where/how MouseWheel events are supposed to be routed for the PDF plugin in M59 and newer?
Thanks,
Marshall