| Index: content/renderer/browser_plugin/browser_plugin.cc
|
| diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
|
| index c2b73247e2508f3ab7f0e7cec619614902447b1e..6a1df4b150ed131f3691d91d03c3f6a2c2050996 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin.cc
|
| +++ b/content/renderer/browser_plugin/browser_plugin.cc
|
| @@ -495,6 +495,17 @@ bool BrowserPlugin::acceptsInputEvents() {
|
| return true;
|
| }
|
|
|
| +namespace {
|
| +
|
| +bool IsScrollEvent(blink::WebInputEvent::Type event_type) {
|
| + return event_type == blink::WebInputEvent::GestureScrollBegin ||
|
| + event_type == blink::WebInputEvent::GestureScrollUpdate ||
|
| + event_type == blink::WebInputEvent::GestureScrollEnd ||
|
| + event_type == blink::WebInputEvent::MouseWheel;
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| bool BrowserPlugin::handleInputEvent(const blink::WebInputEvent& event,
|
| blink::WebCursorInfo& cursor_info) {
|
| if (guest_crashed_ || !attached())
|
| @@ -517,7 +528,15 @@ bool BrowserPlugin::handleInputEvent(const blink::WebInputEvent& event,
|
| view_rect_,
|
| &event));
|
| GetWebKitCursorInfo(cursor_, &cursor_info);
|
| - return true;
|
| +
|
| + // For scroll events we must block and wait for the response from the guest,
|
| + // otherwise we do not know if the guest was able to handle the scroll event.
|
| + // We need to give other elements in the embedder renderer a chance to handle
|
| + // the scroll if the guest did not.
|
| + if (IsScrollEvent(event.type))
|
| + return BrowserPluginManager::Get()->GetScrollHandledStatus();
|
| + else
|
| + return true;
|
| }
|
|
|
| bool BrowserPlugin::handleDragStatusUpdate(blink::WebDragStatus drag_status,
|
|
|