
When system calls were refactored out of PrintedDocument in https://crrev.com/948253, there were extra calls to PrintingContext NewPage() and PageDone() left in PrintedDocument::RenderPrintedDocument. These had no effect on Windows or Linux, but caused an issue for macOS. This was undetected by tests which use TestPrintingContext, and would only be detectable if a test was capable of using system drivers (which generally does not occur on the bots). Adding a test to detect this is difficult at this time, but should be easier to do once later portions of the out-of-process print drivers commit chains fill in more testing capabilities. At that point it should be easier to fire off a request to have the macOS Preview be the output. https://crbug.com/1284745 has been filed to capture this needed effort. Remove NewPage()/PageDone() as common methods to override from PrintingContext and make these specific to macOS only. Update the various implementations of PrintingContext::PrintDocument() to include the aborted and in-print-job checks that were previously in all NewPage() implementations. The same corresponding checks from PageDone() can be handled by PrintedDocument::RenderPrintedDocument() and PrintedDocumentWin::RenderPrintedPage(). There is no concern about `in_print_job_` having changed during the lifetime of RenderPrintedDocument()/RenderPrintedPage(), so just add extra checks against printing having been asynchronouly aborted before allowing a final successful return. Bug: 1283651 Change-Id: I52992bc7550dd25d4ad9a1dc633c7d9452a27bb1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3367333 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Alan Screen <awscreen@chromium.org> Cr-Commit-Position: refs/heads/main@{#955936}
Chromium
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead,
follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.