• rbpotter's avatar
    Fix print job early termination during PDF conversion · d20e4ef3
    rbpotter authored
    Many webpages use window.print() immediately followed by window.close()
    in JS. This means that the renderer and web contents are torn down
    while the PDF is still being converted for the printer on Windows.
    However, the web contents are not needed if the full PDF document has
    already been rendered, so the PrintViewManager should just release the
    query and allow conversion and spooling to complete instead of
    cancelling the job.
    
    The CL to send the Print Preview PDF directly to the PrintViewManager
    broke this for users that use Print Preview because we no longer store an
    extra copy of the web contents in the BackgroundPrintingManager. This has
    been broken if using the system dialog since M64 or earlier.
    
    Bug: 820105
    Change-Id: I308adba43b3604509275f6c0f2946545b94dd1d5
    Reviewed-on: https://chromium-review.googlesource.com/956257
    Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
    Reviewed-by: default avatarWei Li <weili@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#542203}
    d20e4ef3
printed_document.h 7.52 KB