Commit 92f19d9d authored by Mason Freed's avatar Mason Freed Committed by Commit Bot

Disallow QuickLook for popups (color picker, date picker, etc.)

Prior to this CL, using the QuickLook feature (hard-press on the
touchpad of a Mac) on a popup like the color picker or date picker
would cause a crash. TextInputClientMac::GetStringAtPoint()
requires a RenderFrame attached to the RenderWidget on the
renderer side to do anything, which only is true for main frame
and iframes.

Prior to [1], this would not do anything either, but after [1]
this became a crash. This CL returns the behavior to a no-op for
popups.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/2006209

Bug: 1065328
Change-Id: I6a1a1cf12898c615ba756d32dd75bb5f87b4cc86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132963
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755514}
parent 935efb98
......@@ -1701,6 +1701,10 @@ void RenderWidgetHostViewMac::LookUpDictionaryOverlayAtPoint(
if (!widget_host)
return;
// For popups, do not support QuickLook.
if (popup_parent_host_view_)
return;
int32_t target_widget_process_id = widget_host->GetProcess()->GetID();
int32_t target_widget_routing_id = widget_host->GetRoutingID();
TextInputClientMac::GetInstance()->GetStringAtPoint(
......
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