Main frame's context menu should exclude frame-specific commands.
If content::ContextMenuParams includes a non-empty |frame_url|, then the context menu (the menu shown after right clicking in a frame) includes frame-specific commands like "View frame source" and/or "Reload frame". Before r749036 / 82.0.4084.0, context menu shown for the main frame would exclude such frame-specific items. This behavior has regressed in r749036, because it failed to preserve the following logic from //third_party/blink/renderer/core/page/context_menu_controller.cc: if (selected_frame != page_->MainFrame()) data.frame_url = WebURL(UrlFromFrame(selected_frame)); and instead started to unconditionally populate the |frame_url| field in RenderFrameHostImpl::OnContextMenu. This CL fixes the regression. Bug: 1085040 Change-Id: I149447654bee858037a4230828e2c4a7b3c7c0bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212995Reviewed-by:Istiaque Ahmed <lazyboy@chromium.org> Reviewed-by:
Nasko Oskov <nasko@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/master@{#774333}
Showing
Please register or sign in to comment