Correctly retrieve the plugin when printing.
The logic in PrintRenderFrameHelper to retrieve a plugin is out of sync with the logic in WebLocalFrameImpl::PrintBegin(). If PrintRenderFrameHelper thinks it is printing a webpage, while WebLocalFrameImpl thinks it is printing a plugin, bad things happen. Fix this by adding WebLocalFrame::GetPluginToPrint(), to expose the plugin finding logic in WebLocalFrameImpl. With GetPluginToPrint() available, PrintRenderFrameHelper can delete its own GetPlugin() helper, and switch the GetPlugin() callers to use GetPluginToPrint() instead. Once synchronized, some use cases for printing Flash now work correctly. Bug: 1098860 Change-Id: I9500db9ed2d6da0f87dad84c197f738d3a1e3c84 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2317168Reviewed-by:Nate Chapin <japhet@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#791564}
Showing
Please register or sign in to comment