libchromiumcontent/patches/010-browser_plugin_wheel.patch

26 строки
1.4 KiB
Diff
Исходник Обычный вид История

diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 06762fb..e89b1f0 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -448,15 +448,11 @@ blink::WebInputEventResult BrowserPlugin::handleInputEvent(
2017-05-31 02:01:01 +03:00
2017-06-19 19:53:45 +03:00
DCHECK(!blink::WebInputEvent::IsTouchEventType(event.GetType()));
2017-05-31 02:01:01 +03:00
- // 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).
2017-06-19 19:53:45 +03:00
- if (event.GetType() == blink::WebInputEvent::kMouseWheel)
- return blink::WebInputEventResult::kNotHandled;
+ if (event.GetType() == blink::WebInputEvent::kMouseWheel) {
+ auto wheel_event = static_cast<const blink::WebMouseWheelEvent&>(event);
2017-06-19 19:53:45 +03:00
+ if (wheel_event.resending_plugin_id == browser_plugin_instance_id_)
+ return blink::WebInputEventResult::kNotHandled;
+ }
2017-05-31 02:01:01 +03:00
2017-06-19 19:53:45 +03:00
if (blink::WebInputEvent::IsGestureEventType(event.GetType())) {
auto gesture_event = static_cast<const blink::WebGestureEvent&>(event);