Commit f8dd1cda authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Fix mouse capture inside PDFs.

In crrev.com/6e8f1f65 a SetMouseCapture call was missed. Causing the
old issue to regress. Ensure the SetMouseCapture call is there so the
targeting of mouse events is correct during drag.

BUG=1149432

Change-Id: Ie61c25e45ac83d295111088bd8c1e25080c84a08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2541202
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827931}
parent d53af5d7
......@@ -621,6 +621,7 @@ void WebFrameWidgetBase::HandleMouseDown(LocalFrame& main_frame,
hit_node->GetLayoutObject()->IsEmbeddedObject() && html_element &&
html_element->IsPluginElement()) {
mouse_capture_element_ = To<HTMLPlugInElement>(hit_node);
SetMouseCapture(true);
TRACE_EVENT_NESTABLE_ASYNC_BEGIN0("input", "capturing mouse",
TRACE_ID_LOCAL(this));
}
......@@ -1740,8 +1741,10 @@ WebInputEventResult WebFrameWidgetBase::HandleCapturedMouseEvent(
HTMLPlugInElement* element = mouse_capture_element_;
// Not all platforms call mouseCaptureLost() directly.
if (input_event.GetType() == WebInputEvent::Type::kMouseUp)
if (input_event.GetType() == WebInputEvent::Type::kMouseUp) {
SetMouseCapture(false);
MouseCaptureLost();
}
AtomicString event_type;
switch (input_event.GetType()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment