• Lei Zhang's avatar
    Correctly retrieve the plugin when printing. · f8d7d428
    Lei Zhang authored
    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: default avatarNate Chapin <japhet@chromium.org>
    Commit-Queue: Lei Zhang <thestig@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#791564}
    f8d7d428
web_local_frame.h 35.4 KB