New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 455764 link

Starred by 23 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 586603

Blocking:
issue 99379
issue 603559
issue 780770
issue 800893



Sign in to add a comment

OOPIF: Printing Support

Project Member Reported by creis@chromium.org, Feb 5 2015

Issue description

To print pages with out-of-process iframes, we will need to assemble a PDF based on output from several renderer processes.  Each frame's renderer process should not see the partial output of the other frames, so a utility process should probably be created to assemble the pieces into a single PDF.
 

Comment 1 by creis@chromium.org, Feb 5 2015

Blocking: chromium:99379

Comment 2 by creis@chromium.org, Feb 5 2015

Our current plan is to generate Skia SkPictures from each renderer process, collect them in a utility process, and replay the drawing commands onto an SkCanvas that produces a PDF.

The first step will be doing this SkPicture -> PDF conversion in a utility process for a single renderer process.  Once that is shown to work, we can add the "compositing" support to fill in data from OOPIFs.
Cc: sgu...@chromium.org
Cc: vitalyb...@chromium.org
Cc: amistry@chromium.org
I'm sorry it's taken me so long to get around to looking at this.  I think I've got no idea what I'm doing here.  While reading this, assume I know nothing about how Chrome is structured... that's as near as makes no difference accurate.

Looking at printing/pdf_metafile_skia.cc, it looks to me that when we're looking to make a PDF, we do already have an SkPicture for each page (Page::content_ is an SkPicture).  This does make things logically very easy: the bit we want to move over to another process is essentially everything inside the lifetime of pdf_stream in PdfMetafileSkia::FinishDocument(), today lines 132-144, sending serialized versions of those pages in one direction, and getting back a serialized PDF in the other.

Now, we start to get to the parts where I have no idea what I'm doing:
  1) I don't know how to start a temporary process that's equally untrusted as the renderer.  UtilityProcessHost and ServiceUtilityProcessHost seem suspiciously useful, but they both appear to be designed for spinning work off from the browser process.  Can we use them from a renderer?
  2) Spinning off a temporary utility process seems like the wrong long game if we're going to be having multiple renderers talking to this one pdf compositor process.  How do we structure things to have a process running for as long as all the different renderers need to talk to it?
  3)  All the PDF rendering code looks synchronous now, but clearly an IPC version wants to be asynchronous.  Is there a renderer IPC message loop I should be aware of?
  4)  Serializing and deserializing SkPictures is conceptually easy: use SkPicture::serialize() and SkPicture::CreateFromStream().  That serialization, though, has not been vetted for security.  Do I understand it right that if I'm going to want to send SkPictures across Chrome IPC, even exclusively between untrusted sandboxed processes, we need to get that vetted?  As I understand it, once something becomes IPC-able, the temptation becomes very strong to send it to a trusted process, so we require all messages to be secured before we use them for anything?  SkPicture is pretty darn complex, and has zillions of degrees of freedom to allow malformed messages to crash an unsuspecting recipient.  We have a deserializer designed to guard against some of this, but it still seems like a dicey idea.
  5) Does Mojo make any of this easier or harder?  Again, it's conceptually very easy for me to sketch a Mojo interface, e.g., 
  module printing;
  struct Picture {
      array<uint8> serialized;
  };
  struct Pdf {
      array<uint8> pdf;
  };
  interface PdfCompositor {
      // Simplest all in one interface.
      CreatePdf(array<Picture> pages) => (Pdf pdf, int32_t error);
  };
  but I've got no idea how to get a process running a PdfCompositor, how to get my renderer a connection to that PdfCompositor, how to send the request or wait for the response, or if this naive adaptation to Mojo IDL suffers the same security implications that just sending over Chrome IPC does.

Help?
So, kinda answering 1, 2, 4, and 5, use Mojo. It would make it much easier, but then again, I'm kinda biased.

How would this work in a Mojo world? Here's one way:
1. Renderer calls a Mojo service running in the browser process to give it a connection to a "PdfCompositor" service. Mojo makes this nice because you can pass service connections (message pipes) between processes. In the browser process, you would create the utility process and establish a connection to the compositor service you would pass back to the renderer.
2. Once you have your connection to the compositor, you could pass connections to a pages "provider" instead of the pages themselves. You can then pass the other end of the pages connection to each renderer. Note, I have no idea whether this will work. You may need an extra level of indirection.

interface PictureProvider {
  AddPicture(Picture page);
};

interface PdfCompositor {
  CreatePdf(array<PictureProvider&> pages) => (Pdf pdf, int23_t error);
};

3. Profit!

Of course, there are a lot of details. For the security aspect, I think you're ok if you deserialise in the sandboxed utility process. If you any questions, feel free to email or IM me. The utility process is something I'm looking at Mojoifying.

Comment 8 by nasko@chromium.org, Mar 9 2015

I haven't touched Mojo yet, so follow amistry@'s lead on that : ).

Some clarifying notes on general Chrome architecture to help with structuring:
* In general, there is no direct renderer-to-renderer communication channel in Chrome. It is always renderer-to-browser and then browser-to-another renderer. The GPU behaves somewhat differently, but it is a more of a special case.
* UtilityProcessHost is likely what we want, but it isn't directly usable from another renderer due to the above. 
* What needs to happen is for the renderer to serialize its SkPicture into a buffer (probably some shared memory, so we don't need to make multiple copies). Pass this buffer (or a handle to it) to the browser process. The browser process will launch an utility process, pass it the buffer, and that process will do the SkPicture deserialization and conversion to PDF. From that point on, we can use the existing code that takes in PDF into the pipeline.
** This part might be easier to pull off with Mojo in a more "intuitive" way, but I'd defer to amistry@ on this.

* On how multiple processes can talk to the same compositor utility process - this is a path we might need to design, as I don't know if we have existing case that does this. In general, the browser process knows the entire frame tree and knows how many processes are involved in rendering a page. It will likely have to orchestrate the process of instructing renderer process to produce SkPicture, waiting for it to do so, passing it over to the utility process, and doing this for all renderer processes involved.

* When you say "PDF rendering code is synchronous", what is it synchronous in relation to? Assume I have almost zero knowledge about rendering and PDF.

* On the topic of security and serialization. What does SkPicture::serialize() output? Is it just an opaque buffer with some specific size? Or is it something more structured? If it is the former, we are good, as the browser won't need to know anything about what is being transferred around. If we need more structure, then we need to dig a bit deeper.
Calling SkPicture::CreateFromStream() will have to happen in the utility process, which is sandboxed and isolated. We just need to get the bits from the renderer to the utility process.
Yep, it's up to the browser process to coordinate the whole process.

The PDF rendering code being synchronous should not a problem. (At least in my mind) Renderer processes can send synchronous IPCs to the browser and wait for a reply. OTOH, the browser process cannot send sync IPCs, since a malicious process can then block the entire browser.
So, getting back to this bug. I've been playing with getting SkPictures from the renderer to the browser to the utility process. Looking ahead to when we have multiple renderers each rendering their own frame:

- Let's say we have SkPictures from the main frame and an iframe. How do we combine them to draw the main frame to the page and the iframe into the blank part of the page where it should be?

- If we have a main frame that contains iframe A, and iframe A contains iframe B, how can the browser coordinate the compositing so the end result comes out correctly? Does the order matter here? Do we have to combine the SkPictures in that order? Assuming order matters, wouldn't the browser need access to the content::FrameTree to figure out the renderer ordering? (note content::FrameTree is not exposed via content/public)
I hacked together enough code to send a serialized SkPicture fro renderer to browser to utility. With the sandbox turned off, in the utility process, I can write deserialize and save the PDF to disk. Though it's missing images because I did not pass a decoder to SkPicture::CreateFromStream().

So the question here is, what type of decoder do we need? Is something like DecodeBitmap(() in cc/playback/picture.cc, which can decode PNG and JPEG, be sufficient?
I suspect we need to be able to decode anything that the renderer can normally decode. I'm testing an Apache directory listing, which has GIFs, and DecodeBitmap() copied from cc/playback/picture.cc as is cannot handle it.
Cc: -thestig@chromium.org halcanary@chromium.org mtklein@chromium.org
Owner: thestig@chromium.org
Looks like content::DecodeImage() does the trick. The Drive folder below has 2 PDFs:
- expected.pdf: what printing with the system dialog to PDF on Linux generates
- actual.pdf: the save print job, but serialized and deserialized

The two files visually look the same, but their structure is laid out differently. Not sure if this makes a difference. +halcanary in case he's interested.

I can clean up this code a bit and put up a POC CL if needed.

https://drive.google.com/a/google.com/folderview?id=0B3BdWu5R2vnHflREd2pqMVBoSFkxcmZHajYta19tdndSZk1zdVAzaG5oejBDbmhOM015VU0&usp=sharing

Comment 14 by creis@chromium.org, Jul 28 2015

@thestig: This is great!  Thanks for making progress here.

@mtklein: Could you help with the questions and/or reviewing the proof-of-concept CL?
You bet.

(Looking at content::DecodeImage(), that does seem like a good choice.  If Blink's decoding the images in the original process, having Blink decode the images in the other makes sense.)

Comment 16 by mtkl...@google.com, Aug 26 2015

Oh hey, sorry, I hadn't realized #10 was directed at me.

Seems like we need to boil things down to a back-to-front sequence of SkPictures and a transform for each, or at least a linearizable tree of the same.

Once we've got those, let's say as 

struct Layer {
  const SkPicture* pic;
  SkMatrix ctm;
  SkPaint paint;
};

we can draw our layers back to front into a single SkCanvas with
  for (int i = 0; i < layers.count(); i++) {
    canvas->drawPicture(layers[i].pic, &layers[i].ctm, &layers[i].paint);
  }

which I think is just a shortcut for a more familiar 
  for (...) {
    canvas->saveLayer(layers[i].pic->cullRect(), &layers[i].paint);
      canvas->concat(layers[i].ctm);
      canvas->drawPicture(layers[i].pic);
    canvas->restore();
  }

That ctm SkMatrix can offset the iframe'd pictures (and scale them if needed, and more), and the SkPaint can express any alpha, funky transfermode, etc.

Not all blend operations are associative, so it is pretty important to maintain the original compositing order: (iframeB @ iframeA) @ main might not be the same as iframeB @ (iframeA @ main), depending on what blend function '@' represents.
Blockedon: chromium:586603
Labels: Proj-TopDocumentIsolation-BlockingLaunch
Adding a Proj-TopDocumentIsolation-BlockingLaunch label as discussed today with nasko@.
Cc: ranjitkan@chromium.org thestig@chromium.org creis@chromium.org alex...@chromium.org rob@robwu.nl nyerramilli@chromium.org
 Issue 631513  has been merged into this issue.

Comment 20 by rob@robwu.nl, Oct 6 2016

Chrome 55 branch point is around the corner, and --isolate-extensions shipped by default in 55. This bug affects the PDF Viewer extension ( bug 650952 , marked as a duplicate of this one).

Is it feasible to unbreak the functionality for the special case where the print request is issued for a frame that does not contain child frames from another process? I expect that subproblem to be much easier than the general case where multiple processes have to cooperate, and fixing it would fix  bug 650952 .
I agree with Rob-- I think we probably don't want to merge  issue 631513  into this.  That bug is specifically about the print dialog not working from within an OOPIF, which is different than printing a page with OOPIFs in it.

If we can fix the dialog bug, we might be able to get printing to work for just that frame, without tackling the "stitch together images from multiple processes" problem.  That seems like something we should do ASAP.

thestig@: Any objections to splitting that bug back out and having someone try to solve it?
Not at all. Unmerging...

Comment 23 by creis@chromium.org, Nov 29 2016

Cc: weili@chromium.org
+weili@, who is working on a design for this.
Blocking: 603559
Cc: -mtklein@chromium.org
Cc: -vitalyb...@chromium.org
Cc: eseckler@chromium.org
For headless chrome (a content embedder), we're interested in generating print-PDFs of webpages (that may include OOPIFs) via DevTools, see https://bugs.chromium.org/p/chromium/issues/detail?id=603559.

We're trying to figure out how much will change for content embedders when you introduce your support for OOPIFs. Currently, a content embedder (e.g. chrome's PrintViewManager) exchanges messages with a single renderer-side entity (PrintWebViewHelper). From the perspective of the embedder, will this change with your utility process - or will this be a change transparent to embedders? Thanks!
eseckler@, the design for OOPIF printing support (https://docs.google.com/document/d/1G8DRy1TiEDGWaqDZU9d_7ef8LBCKXVmjkGLxxBPRAoE/edit?usp=sharing) is to be transparent to content layer or devtool.

Now, a content embedder may exchange messages with multiple renderers if the content has OOP iframes. I didn't find how headless chrome uses/plans to use printing classes, but as long as it is on or above content layer, the change should be transparent. 
Project Member

Comment 29 by bugdroid1@chromium.org, May 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890

commit fabbf757ba1f0fe03a5671eb0bb4936efbb4a890
Author: weili <weili@chromium.org>
Date: Mon May 22 19:05:16 2017

Add PDF compositor service

Currently, the service converts one or multiple pages encapsulated in a
SkMultiPictureDocument to a PDF file. It runs in a sandboxed utility process.

This allows Chromium to move PDF generation code into a separate
process, and eventually can support compositing content generated from
multiple processes.

BUG= 455764 

Review-Url: https://codereview.chromium.org/2832633002
Cr-Commit-Position: refs/heads/master@{#473644}

[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/chrome/app/BUILD.gn
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/chrome/browser/BUILD.gn
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/chrome/browser/browser_resources.grd
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/chrome/utility/BUILD.gn
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/chrome/utility/DEPS
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/chrome/utility/chrome_content_utility_client.cc
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/chrome/utility/chrome_content_utility_client.h
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/BUILD.gn
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/DEPS
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/README.md
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/pdf_compositor_impl.cc
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/pdf_compositor_impl.h
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/pdf_compositor_manifest.json
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/pdf_compositor_service.cc
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/pdf_compositor_service.h
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/public/cpp/BUILD.gn
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/public/cpp/pdf_compositor_client.cc
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/public/cpp/pdf_compositor_client.h
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/public/cpp/pdf_compositor_service_factory.cc
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/public/cpp/pdf_compositor_service_factory.h
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/public/interfaces/BUILD.gn
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/public/interfaces/OWNERS
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/components/printing/service/public/interfaces/pdf_compositor.mojom
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/content/child/child_thread_impl.h
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/content/public/child/child_thread.h
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/content/public/renderer/render_thread.h
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/content/renderer/render_thread_impl.h
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/printing/BUILD.gn
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/printing/common/BUILD.gn
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/printing/common/pdf_metafile_utils.cc
[add] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/printing/common/pdf_metafile_utils.h
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/printing/pdf_metafile_skia.cc
[modify] https://crrev.com/fabbf757ba1f0fe03a5671eb0bb4936efbb4a890/printing/pdf_metafile_skia.h

Blockedon: 734815
Project Member

Comment 31 by bugdroid1@chromium.org, Jul 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/04c36f14562dc46403c199ff9d9478101d9bc04a

commit 04c36f14562dc46403c199ff9d9478101d9bc04a
Author: weili <weili@chromium.org>
Date: Sun Jul 30 01:48:49 2017

Add error handling and unit test for pdf compositor service

Add a return status code to avoid aborting the service upon any error.
Mojo verifies the validity of returned handle, will exit it is not
valid.

Also add unit test for this service.

BUG= chromium:455764 

Review-Url: https://codereview.chromium.org/2919823004
Cr-Commit-Position: refs/heads/master@{#490679}

[modify] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/printing/service/BUILD.gn
[modify] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/printing/service/DEPS
[modify] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/printing/service/pdf_compositor_impl.cc
[modify] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/printing/service/pdf_compositor_service.cc
[modify] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/printing/service/pdf_compositor_service.h
[add] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/printing/service/pdf_compositor_service_unittest.cc
[add] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/printing/service/pdf_compositor_service_unittest_manifest.json
[modify] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/printing/service/public/cpp/pdf_compositor_client.cc
[modify] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/printing/service/public/interfaces/pdf_compositor.mojom
[add] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/printing/service/test_service_main.cc
[add] https://crrev.com/04c36f14562dc46403c199ff9d9478101d9bc04a/components/test/data/printing/google.mskp

Comment 32 by weili@chromium.org, Aug 14 2017

Owner: weili@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 33 by bugdroid1@chromium.org, Aug 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f3dfa6fef23fab9dc3200bd02f720a6c478a7cb1

commit f3dfa6fef23fab9dc3200bd02f720a6c478a7cb1
Author: Wei Li <weili@chromium.org>
Date: Mon Aug 21 23:04:37 2017

Uniformize and simplify printing initialization procedure

Currently there are multiple paths which need to initialize printing.
These paths all share similar code. Use a function to make the procedure
more clear and uniform.

BUG= 455764 

Change-Id: I193142e0b325071020c4e58def7156b9fbacb29f
Reviewed-on: https://chromium-review.googlesource.com/620249
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496106}
[modify] https://crrev.com/f3dfa6fef23fab9dc3200bd02f720a6c478a7cb1/chrome/browser/BUILD.gn
[modify] https://crrev.com/f3dfa6fef23fab9dc3200bd02f720a6c478a7cb1/chrome/browser/extensions/api/chrome_extensions_api_client.cc
[add] https://crrev.com/f3dfa6fef23fab9dc3200bd02f720a6c478a7cb1/chrome/browser/printing/printing_init.cc
[add] https://crrev.com/f3dfa6fef23fab9dc3200bd02f720a6c478a7cb1/chrome/browser/printing/printing_init.h
[modify] https://crrev.com/f3dfa6fef23fab9dc3200bd02f720a6c478a7cb1/chrome/browser/ui/apps/chrome_app_delegate.cc
[modify] https://crrev.com/f3dfa6fef23fab9dc3200bd02f720a6c478a7cb1/chrome/browser/ui/tab_helpers.cc

Project Member

Comment 34 by bugdroid1@chromium.org, Aug 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d0e050275544ea44ca403599418abca6d43b1c7b

commit d0e050275544ea44ca403599418abca6d43b1c7b
Author: Wei Li <weili@chromium.org>
Date: Tue Aug 22 03:56:52 2017

Refactor Skia document type into an enum class

Change Skia document type from an enum type to an enum class type so
that type checking will be stricter and more clear.

BUG= 455764 
TBR=eseckler@chromium.org

Change-Id: Ia474e0c0a2b607884dc2f248301f3b003ef07e66
Reviewed-on: https://chromium-review.googlesource.com/619502
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496202}
[modify] https://crrev.com/d0e050275544ea44ca403599418abca6d43b1c7b/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/d0e050275544ea44ca403599418abca6d43b1c7b/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/d0e050275544ea44ca403599418abca6d43b1c7b/components/printing/renderer/print_render_frame_helper_linux.cc
[modify] https://crrev.com/d0e050275544ea44ca403599418abca6d43b1c7b/components/printing/renderer/print_render_frame_helper_mac.mm
[modify] https://crrev.com/d0e050275544ea44ca403599418abca6d43b1c7b/components/printing/renderer/print_render_frame_helper_pdf_win.cc
[modify] https://crrev.com/d0e050275544ea44ca403599418abca6d43b1c7b/components/printing/test/mock_printer.cc
[modify] https://crrev.com/d0e050275544ea44ca403599418abca6d43b1c7b/headless/lib/browser/headless_print_manager.cc
[modify] https://crrev.com/d0e050275544ea44ca403599418abca6d43b1c7b/printing/common/pdf_metafile_utils.h
[modify] https://crrev.com/d0e050275544ea44ca403599418abca6d43b1c7b/printing/pdf_metafile_skia.cc

Comment 35 by ctzsm@chromium.org, Aug 25 2017

Cc: ctzsm@chromium.org
Project Member

Comment 36 by bugdroid1@chromium.org, Aug 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/01a170a8595c9ffd7ad144a02a7748db4313ecec

commit 01a170a8595c9ffd7ad144a02a7748db4313ecec
Author: Wei Li <weili@chromium.org>
Date: Fri Aug 25 19:17:32 2017

Add document type into print parameter

Add document type into print parameter so that the renderer may return
printed document in different formats such as PDF, or Skia multi-picture
types. This is to prepare renderers to send back printed result in Skia
multi-picture format to be composed later.

BUG= 455764 

Change-Id: I2423ba4b35cc4c26ad43050988efc8d6107c6565
Reviewed-on: https://chromium-review.googlesource.com/627583
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497485}
[modify] https://crrev.com/01a170a8595c9ffd7ad144a02a7748db4313ecec/components/printing/browser/print_manager_utils.cc
[modify] https://crrev.com/01a170a8595c9ffd7ad144a02a7748db4313ecec/components/printing/common/BUILD.gn
[modify] https://crrev.com/01a170a8595c9ffd7ad144a02a7748db4313ecec/components/printing/common/print_messages.cc
[modify] https://crrev.com/01a170a8595c9ffd7ad144a02a7748db4313ecec/components/printing/common/print_messages.h
[modify] https://crrev.com/01a170a8595c9ffd7ad144a02a7748db4313ecec/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/01a170a8595c9ffd7ad144a02a7748db4313ecec/components/printing/renderer/print_render_frame_helper.h
[modify] https://crrev.com/01a170a8595c9ffd7ad144a02a7748db4313ecec/components/printing/renderer/print_render_frame_helper_linux.cc
[modify] https://crrev.com/01a170a8595c9ffd7ad144a02a7748db4313ecec/components/printing/renderer/print_render_frame_helper_mac.mm
[modify] https://crrev.com/01a170a8595c9ffd7ad144a02a7748db4313ecec/components/printing/renderer/print_render_frame_helper_pdf_win.cc

Project Member

Comment 37 by bugdroid1@chromium.org, Aug 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55

commit b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55
Author: Wei Li <weili@chromium.org>
Date: Mon Aug 28 23:26:09 2017

Embed pdf compositor service in Headless Chrome

Add the support to use packaged services in Headless Chrome. Also pack
pdf compositor service into it. Enable launching the service as an out of
process utility process.

BUG= 455764 

Change-Id: I385f18b918ef541b0937dd2f41679fa4a43f2d62
Reviewed-on: https://chromium-review.googlesource.com/614385
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497930}
[modify] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/BUILD.gn
[modify] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/DEPS
[modify] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/browser/OWNERS
[add] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/browser/headless_browser_manifest_overlay.json
[delete] https://crrev.com/a0f1299665254496f8dec21ad41cfa93cad002dd/headless/lib/browser/headless_browser_manifest_overlay_template.json
[modify] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/browser/headless_content_browser_client.cc
[modify] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/browser/headless_content_browser_client.h
[add] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/browser/headless_packaged_services_manifest_overlay.json
[modify] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/headless_content_main_delegate.cc
[modify] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/headless_content_main_delegate_win.cc
[modify] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/resources/headless_lib_resources.grd
[add] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/utility/DEPS
[add] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/utility/headless_content_utility_client.cc
[add] https://crrev.com/b5add72c7acc5d9b33cfe14042e8e90b8d9b4f55/headless/lib/utility/headless_content_utility_client.h

Project Member

Comment 38 by bugdroid1@chromium.org, Aug 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9b8dd832ab573cbcf252da0f51fc44747759397c

commit 9b8dd832ab573cbcf252da0f51fc44747759397c
Author: Wei Li <weili@chromium.org>
Date: Thu Aug 31 18:39:21 2017

Add discardable memory mgr in "app" for content browser

"DiscardableSharedMemoryManager" interface is needed by two services:
profiling and pdf_compositor. It was included in "utility" before which
was removed. Now add it in "app" so services can use it.

BUG= 455764 

Change-Id: I5fe0f8299cd2a927b158c02c13a87db65867a32b
Reviewed-on: https://chromium-review.googlesource.com/643788
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498930}
[modify] https://crrev.com/9b8dd832ab573cbcf252da0f51fc44747759397c/chrome/profiling/profiling_manifest.json
[modify] https://crrev.com/9b8dd832ab573cbcf252da0f51fc44747759397c/components/printing/service/pdf_compositor_manifest.json
[modify] https://crrev.com/9b8dd832ab573cbcf252da0f51fc44747759397c/content/public/app/mojo/content_browser_manifest.json

Project Member

Comment 39 by bugdroid1@chromium.org, Sep 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/728e23ba2703a84822d963ddaeb3ca0794480b9b

commit 728e23ba2703a84822d963ddaeb3ca0794480b9b
Author: Wei Li <weili@chromium.org>
Date: Tue Sep 05 21:01:46 2017

Change pdf compositor interface to "compositor"

Use noun instead of verb for the interface name to be consistent with
other interface names. Thus change the name from "composite" to
"compositor".

BUG= 455764 

Change-Id: Ib3ebd6d5775181dd4a96c0c79ff3a82a56692952
Reviewed-on: https://chromium-review.googlesource.com/650533
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499747}
[modify] https://crrev.com/728e23ba2703a84822d963ddaeb3ca0794480b9b/components/printing/service/pdf_compositor_manifest.json
[modify] https://crrev.com/728e23ba2703a84822d963ddaeb3ca0794480b9b/components/printing/service/pdf_compositor_service_unittest_manifest.json
[modify] https://crrev.com/728e23ba2703a84822d963ddaeb3ca0794480b9b/headless/lib/browser/headless_browser_manifest_overlay.json

Project Member

Comment 40 by bugdroid1@chromium.org, Sep 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e643d6af5feab0a8a8298150cae10ed70875546

commit 6e643d6af5feab0a8a8298150cae10ed70875546
Author: Wei Li <weili@chromium.org>
Date: Tue Sep 26 05:26:05 2017

Allow ppapi utility process to access fonts on Windows

Change windows sandbox policy to allow ppapi utility process to
access font directory in file system. Also set pdf compositor
service's sandboxing type as ppapi so it can access font system
on various platforms.

BUG= 455764 

Change-Id: I356ddfe57e172e90a6d6deaf4bcf6d39dc1b5b97
Reviewed-on: https://chromium-review.googlesource.com/682767
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504288}
[modify] https://crrev.com/6e643d6af5feab0a8a8298150cae10ed70875546/components/printing/service/pdf_compositor_manifest.json
[modify] https://crrev.com/6e643d6af5feab0a8a8298150cae10ed70875546/content/common/sandbox_win.cc

Project Member

Comment 41 by bugdroid1@chromium.org, Sep 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c141e0f547da57663013c1896fe1753965106f59

commit c141e0f547da57663013c1896fe1753965106f59
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Sep 27 11:35:08 2017

Implement beforeprint/afterprint events.

https://html.spec.whatwg.org/multipage/webappapis.html#windoweventhandlers
Also, this CL adds comments about OOPIF printing.


Bug:  218205 ,  455764 
Change-Id: I8f1e7ac200abaf72cc3c104c8690b67c8529098c
Reviewed-on: https://chromium-review.googlesource.com/683856
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504628}
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/components/printing/test/print_render_frame_helper_browsertest.cc
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/window-properties-expected.txt
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces-expected.txt
[delete] https://crrev.com/3a813a85bab20fa6c0fc5591fcea34598bd6a1e4/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/events/body-exposed-window-event-handlers-expected.txt
[delete] https://crrev.com/3a813a85bab20fa6c0fc5591fcea34598bd6a1e4/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt
[delete] https://crrev.com/3a813a85bab20fa6c0fc5591fcea34598bd6a1e4/third_party/WebKit/LayoutTests/fast/dom/window-event-handlers-expected.txt
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/Source/core/events/EventTypeNames.json5
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/Source/core/frame/DOMWindowEventHandlers.h
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/Source/core/frame/WindowEventHandlers.idl
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/Source/core/html/HTMLAttributeNames.json5
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp
[modify] https://crrev.com/c141e0f547da57663013c1896fe1753965106f59/third_party/WebKit/Source/core/html/HTMLFrameSetElement.cpp

Cc: -sgu...@chromium.org
Blockedon: 769479
Project Member

Comment 44 by bugdroid1@chromium.org, Sep 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88cc015615ffaf2828702dd05eab602a1ea28456

commit 88cc015615ffaf2828702dd05eab602a1ea28456
Author: Wei Li <weili@chromium.org>
Date: Thu Sep 28 08:10:34 2017

Expose DirectWrite font proxy messages to ppapi utility process

Allow adding message filter in utility process host. Also add Direct
Write proxy message filter for ppapi utlity process so that ppapi
process can properly initialize font proxy during start up.

BUG= 455764 

Change-Id: Ib3cf25967ba80fb6966c825502872b06b8005c28
Reviewed-on: https://chromium-review.googlesource.com/682882
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504940}
[modify] https://crrev.com/88cc015615ffaf2828702dd05eab602a1ea28456/content/browser/service_manager/service_manager_context.cc
[modify] https://crrev.com/88cc015615ffaf2828702dd05eab602a1ea28456/content/browser/utility_process_host_impl.cc
[modify] https://crrev.com/88cc015615ffaf2828702dd05eab602a1ea28456/content/browser/utility_process_host_impl.h
[modify] https://crrev.com/88cc015615ffaf2828702dd05eab602a1ea28456/content/public/browser/utility_process_host.h

Project Member

Comment 45 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb

commit bf941b2b1f9a53ecb2d3263b80a21f42340d51bb
Author: Wei Li <weili@chromium.org>
Date: Tue Oct 03 20:00:52 2017

Add access to direct write font proxy in pdf compositor service

Pdf compositor service needs to access direct write font proxy to
be able to use skia to draw properly on Windows. This CL move font
proxy init header to public so more processes (including ours)
can use it, also it adds font proxy initialization in pdf
compositor service.

TBR=thestig@chromium.org
BUG= 455764 

Change-Id: Ia7bf3c7804ae0fea671087a53cf177615ca4d59e
Reviewed-on: https://chromium-review.googlesource.com/685271
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506150}
[modify] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/components/printing/service/BUILD.gn
[modify] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/components/printing/service/DEPS
[modify] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/components/printing/service/pdf_compositor_service.cc
[modify] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/content/child/BUILD.gn
[modify] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/content/child/child_thread_impl.cc
[rename] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/content/child/dwrite_font_proxy/dwrite_font_proxy_init_impl_win.cc
[rename] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/content/child/dwrite_font_proxy/dwrite_font_proxy_init_impl_win.h
[modify] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/content/ppapi_plugin/ppapi_plugin_main.cc
[modify] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/content/public/child/BUILD.gn
[add] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/content/public/child/dwrite_font_proxy_init_win.h
[modify] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/content/public/test/render_view_test.cc
[modify] https://crrev.com/bf941b2b1f9a53ecb2d3263b80a21f42340d51bb/content/renderer/renderer_main_platform_delegate_win.cc

Project Member

Comment 46 by bugdroid1@chromium.org, Oct 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6553be42a327754d179cc80048b438b58e7c9c9b

commit 6553be42a327754d179cc80048b438b58e7c9c9b
Author: Wei Li <weili@chromium.org>
Date: Wed Oct 04 21:06:52 2017

Setup proper sandbox policy for pdf compositor service

Pdf compositor service is a utility service that uses skia to render
and generate pdf document. Thus it needs to access local font system.
On Linux, it needs 'uname' to get user agent. So, on Windows and Mac,
it resembles ppapi process in term of sandbox policy. On Linux, it is
closer to utility process's sandbox requirements. To make its
requirements clear, we create a new service sandbox type for it, and
apply appropriate policy on different platforms.

TBR=jam@chromium.org
BUG= 455764 

Change-Id: I7c7aeb40e5e0b09fe29887532c06d2abc04969d6
Reviewed-on: https://chromium-review.googlesource.com/695781
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506514}
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/components/printing/service/pdf_compositor_manifest.json
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/content/browser/utility_process_host_impl.cc
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/content/common/BUILD.gn
[add] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/content/common/sandbox_linux/bpf_pdf_compositor_policy_linux.cc
[add] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/content/common/sandbox_linux/bpf_pdf_compositor_policy_linux.h
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/content/common/sandbox_mac.mm
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/content/common/sandbox_win.cc
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/services/service_manager/sandbox/sandbox_type.cc
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/services/service_manager/sandbox/sandbox_type.h
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/services/service_manager/sandbox/switches.cc
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/services/service_manager/sandbox/switches.h
[modify] https://crrev.com/6553be42a327754d179cc80048b438b58e7c9c9b/services/service_manager/tests/sandbox/sandbox_type_unittest.cc

Project Member

Comment 47 by bugdroid1@chromium.org, Oct 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02720a4a186cd51ec596653a2c28637ffb865936

commit 02720a4a186cd51ec596653a2c28637ffb865936
Author: Wei Li <weili@chromium.org>
Date: Wed Oct 25 22:06:48 2017

Record whether doc is modifiable in print settings

In print preview, we already record and use whether the printed
document is modifiable to indicate whether the doc is html vs other
format like pdf. This CL records such info in print settings too
so that during print we can leverage such information. This is to
help print backend to know whether the printed document requires
composition for oopifs.

BUG= 455764 

Change-Id: I7b8524930a2c1cc2d7a6a78b49cfb0790710e82f
Reviewed-on: https://chromium-review.googlesource.com/696438
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511607}
[modify] https://crrev.com/02720a4a186cd51ec596653a2c28637ffb865936/printing/print_settings.cc
[modify] https://crrev.com/02720a4a186cd51ec596653a2c28637ffb865936/printing/print_settings.h
[modify] https://crrev.com/02720a4a186cd51ec596653a2c28637ffb865936/printing/print_settings_conversion.cc
[modify] https://crrev.com/02720a4a186cd51ec596653a2c28637ffb865936/printing/printing_context.cc

Project Member

Comment 48 by bugdroid1@chromium.org, Oct 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab

commit 9c391ac04f9ac478c8b0e43b359c2b43a6c892ab
Author: Wei Li <weili@chromium.org>
Date: Wed Oct 25 22:26:33 2017

Use pdf compositor service for printing when OOPIF is enabled

When OOPIF is enabled (by site-per-process flag or
top-document-isolation feature), use the pdf compositor service for
converting PaintRecord to PDF on renderers.

In the future, this will make compositing PDF from multiple renderers
possible.

TBR=jzfeng@chromium.org
BUG= 455764 

Change-Id: I3c28f03f4358e4228239fe1a33384f85e7716e8f
Reviewed-on: https://chromium-review.googlesource.com/699765
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511616}
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/chrome/browser/chrome_content_browser_manifest_overlay.json
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/chrome/browser/printing/print_preview_dialog_controller.cc
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/chrome/browser/printing/print_preview_message_handler.cc
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/chrome/browser/printing/print_preview_message_handler.h
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/chrome/browser/printing/print_view_manager_base.h
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/chrome/browser/printing/printing_init.cc
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/chrome/utility/chrome_content_utility_client.cc
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/components/printing/browser/BUILD.gn
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/components/printing/browser/DEPS
[add] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/components/printing/browser/print_composite_client.cc
[add] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/components/printing/browser/print_composite_client.h
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/components/printing/browser/print_manager_utils.cc
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/components/printing/browser/print_manager_utils.h
[modify] https://crrev.com/9c391ac04f9ac478c8b0e43b359c2b43a6c892ab/headless/lib/browser/headless_web_contents_impl.cc

Project Member

Comment 49 by bugdroid1@chromium.org, Oct 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/370f85549f0791ea73c4dbd0aa0fdb1aac1ed340

commit 370f85549f0791ea73c4dbd0aa0fdb1aac1ed340
Author: Wei Li <weili@chromium.org>
Date: Mon Oct 30 20:28:57 2017

Fix a regression due to sandbox type change

The direct write message filter should be used for pdf
compositor only in utility process host.

BUG= 455764 

Change-Id: I939f5568c783f4e460ac399532581ed2b789dcc5
Reviewed-on: https://chromium-review.googlesource.com/742687
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512605}
[modify] https://crrev.com/370f85549f0791ea73c4dbd0aa0fdb1aac1ed340/content/browser/service_manager/service_manager_context.cc

Project Member

Comment 50 by bugdroid1@chromium.org, Nov 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0f83d0347ba1b72a02a64d56ff9b9f86a96c1b17

commit 0f83d0347ba1b72a02a64d56ff9b9f86a96c1b17
Author: Wei Li <weili@chromium.org>
Date: Fri Nov 03 18:19:01 2017

Change pdf compositor unit test to run in a single process

Previously, the unit test for pdf compositor service needed a test
service running in a separate process. Now we change to run the
test service in process so the unit test can be built and run with
other unit tests.

This CL also has a minor fix for not comparing the size of a shared
memory handle with its mapped size because the handle's size
represents the allocated size of the shared memory.

BUG= 455764 

Change-Id: I0db93e828c99922be54b77814faa29e3f703f493
Reviewed-on: https://chromium-review.googlesource.com/748687
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513841}
[modify] https://crrev.com/0f83d0347ba1b72a02a64d56ff9b9f86a96c1b17/components/printing/service/BUILD.gn
[modify] https://crrev.com/0f83d0347ba1b72a02a64d56ff9b9f86a96c1b17/components/printing/service/DEPS
[modify] https://crrev.com/0f83d0347ba1b72a02a64d56ff9b9f86a96c1b17/components/printing/service/pdf_compositor_service_unittest.cc
[delete] https://crrev.com/9a0e42a43b3a5bdcb81d8fb4617537156631d032/components/printing/service/test_service_main.cc

Project Member

Comment 51 by bugdroid1@chromium.org, Nov 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4e2d1cb06edf83f90825ddcce897e6300db530d7

commit 4e2d1cb06edf83f90825ddcce897e6300db530d7
Author: Wei Li <weili@chromium.org>
Date: Tue Nov 07 21:23:00 2017

Add printing service unit test to components unittests

Make components unittests to be able to use and test services by
setting proper catalog information. Also add printing service unit
test into components unittests so it can be tested on bots.

BUG= 455764 

Change-Id: Ib3e2c59c490e65b2204786993eb880aafa0c239e
Reviewed-on: https://chromium-review.googlesource.com/749113
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514597}
[modify] https://crrev.com/4e2d1cb06edf83f90825ddcce897e6300db530d7/components/BUILD.gn
[modify] https://crrev.com/4e2d1cb06edf83f90825ddcce897e6300db530d7/components/printing/service/BUILD.gn
[modify] https://crrev.com/4e2d1cb06edf83f90825ddcce897e6300db530d7/components/test/BUILD.gn
[modify] https://crrev.com/4e2d1cb06edf83f90825ddcce897e6300db530d7/components/test/DEPS
[modify] https://crrev.com/4e2d1cb06edf83f90825ddcce897e6300db530d7/components/test/run_all_unittests.cc

Comment 52 by creis@chromium.org, Nov 14 2017

Blocking: 780770
Project Member

Comment 53 by bugdroid1@chromium.org, Nov 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/13f15c1b9419b85bc0e6640d6848b8e695f74979

commit 13f15c1b9419b85bc0e6640d6848b8e695f74979
Author: Wei Li <weili@chromium.org>
Date: Wed Nov 22 18:04:14 2017

Move mojo utility functions for sharing

Mojo utility functions can be used by both browser and pdf compositor
service. Move them to the new location to make sharing easier.

BUG= 455764 

Change-Id: Ie5340b63b4204baeed2cbf646d6f24b73729147c
Reviewed-on: https://chromium-review.googlesource.com/779309
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518680}
[modify] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/chrome/browser/BUILD.gn
[modify] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/chrome/browser/printing/print_preview_message_handler.cc
[modify] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/components/printing/browser/BUILD.gn
[modify] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/components/printing/browser/print_composite_client.cc
[modify] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/components/printing/browser/print_composite_client.h
[modify] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/components/printing/service/BUILD.gn
[modify] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/components/printing/service/pdf_compositor_impl.cc
[modify] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/components/printing/service/pdf_compositor_service_unittest.cc
[modify] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/components/printing/service/public/cpp/BUILD.gn
[add] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/components/printing/service/public/cpp/pdf_service_mojo_utils.cc
[add] https://crrev.com/13f15c1b9419b85bc0e6640d6848b8e695f74979/components/printing/service/public/cpp/pdf_service_mojo_utils.h

Blocking: 800893
Project Member

Comment 55 by bugdroid1@chromium.org, Jan 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce

commit 2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce
Author: Wei Li <weili@chromium.org>
Date: Sat Jan 13 05:42:56 2018

Add custom data op in paint op buffer

Custom data op allows users to draw placeholders into paint op buffer.
These placeholders can later be replaced with user supplied contents
through calling user provided callback function.
This is useful for printing out of process iframes, whose content is
painted from another process.

BUG= 455764 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I79a113ea10e9d2072676030342332b773877fa14
Reviewed-on: https://chromium-review.googlesource.com/862897
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: enne <enne@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529164}
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/display_item_list.cc
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/paint_canvas.h
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/paint_op_buffer.cc
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/paint_op_buffer.h
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/paint_op_buffer_unittest.cc
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/paint_shader.cc
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/paint_shader_unittest.cc
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/record_paint_canvas.cc
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/record_paint_canvas.h
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/skia_paint_canvas.cc
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/skia_paint_canvas.h
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/paint/solid_color_analyzer.cc
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/test/paint_op_helper.h
[modify] https://crrev.com/2a9bfe4538e4b99f6adbf5b22ff65c15da6399ce/cc/test/test_skcanvas.h

Project Member

Comment 56 by bugdroid1@chromium.org, Jan 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d737563f986f1ece3016211a26aae2c323ae73d

commit 8d737563f986f1ece3016211a26aae2c323ae73d
Author: Wei Li <weili@chromium.org>
Date: Wed Jan 24 21:38:04 2018

Complete pdf compositor service

Add interfaces and functions to allow passing in and compositing
contents from multiple frames in pdf compositor service.

Each frame is identified by its global unique id (rph id and rfh id).
Content id is a unique id within its process. Each frame may have oop
subframes. The pdf compositor service will keep track of all the frame
contents and their relationship. When all subframes are painted, the
service can composite the entire frame and convert it into PDF format.

Please refer document goo.gl/ACV6VM for more explanations.

BUG= 455764 

Change-Id: I3213d9ae0ca85d0ea695dd13acb00938499aa73b
Reviewed-on: https://chromium-review.googlesource.com/767912
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531687}
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/chrome/browser/printing/print_preview_message_handler.cc
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/chrome/browser/printing/print_preview_message_handler.h
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/chrome/browser/printing/print_view_manager_base.h
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/browser/BUILD.gn
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/browser/DEPS
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/browser/print_composite_client.cc
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/browser/print_composite_client.h
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/common/print_messages.h
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/service/BUILD.gn
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/service/pdf_compositor_impl.cc
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/service/pdf_compositor_impl.h
[add] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/service/pdf_compositor_impl_unittest.cc
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/service/pdf_compositor_service_unittest.cc
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/service/public/cpp/BUILD.gn
[delete] https://crrev.com/23d38ad404677dd8e71d9a0b4f6d143cfb6966ac/components/printing/service/public/cpp/pdf_compositor_client.cc
[delete] https://crrev.com/23d38ad404677dd8e71d9a0b4f6d143cfb6966ac/components/printing/service/public/cpp/pdf_compositor_client.h
[add] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/service/public/cpp/pdf_service_mojo_types.h
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/components/printing/service/public/interfaces/pdf_compositor.mojom
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/printing/common/pdf_metafile_utils.cc
[modify] https://crrev.com/8d737563f986f1ece3016211a26aae2c323ae73d/printing/common/pdf_metafile_utils.h

Project Member

Comment 57 by bugdroid1@chromium.org, Jan 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c9a194557fcccf1a858b788328ba3be820c80be7

commit c9a194557fcccf1a858b788328ba3be820c80be7
Author: Wei Li <weili@chromium.org>
Date: Wed Jan 24 22:21:04 2018

IPC message changes to support pdf composition

Add new IPC messages and change a couple existing ones to allow
subframe printing for OOPIFs and return relevant information.

There are two major changes:
-- Print subframe content and return it;
-- For existing printing calls, return its subframe info as well.

BUG= 455764 

Change-Id: I41dd21f494b8c393ec40636498d053660c336c27
Reviewed-on: https://chromium-review.googlesource.com/769351
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Jianzhou Feng <jzfeng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531714}
[modify] https://crrev.com/c9a194557fcccf1a858b788328ba3be820c80be7/chrome/browser/printing/print_preview_message_handler.cc
[modify] https://crrev.com/c9a194557fcccf1a858b788328ba3be820c80be7/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/c9a194557fcccf1a858b788328ba3be820c80be7/components/printing/common/print_messages.cc
[modify] https://crrev.com/c9a194557fcccf1a858b788328ba3be820c80be7/components/printing/common/print_messages.h
[modify] https://crrev.com/c9a194557fcccf1a858b788328ba3be820c80be7/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/c9a194557fcccf1a858b788328ba3be820c80be7/components/printing/renderer/print_render_frame_helper.h
[modify] https://crrev.com/c9a194557fcccf1a858b788328ba3be820c80be7/components/printing/renderer/print_render_frame_helper_linux.cc
[modify] https://crrev.com/c9a194557fcccf1a858b788328ba3be820c80be7/components/printing/test/mock_printer.cc
[modify] https://crrev.com/c9a194557fcccf1a858b788328ba3be820c80be7/components/printing/test/print_render_frame_helper_browsertest.cc
[modify] https://crrev.com/c9a194557fcccf1a858b788328ba3be820c80be7/headless/lib/browser/headless_print_manager.cc

Project Member

Comment 58 by bugdroid1@chromium.org, Feb 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bc33ea5ed7dbbea75d0743a7c4558d7be827a7b0

commit bc33ea5ed7dbbea75d0743a7c4558d7be827a7b0
Author: Wei Li <weili@chromium.org>
Date: Thu Feb 08 01:31:19 2018

Allow printed pages and document share content

Print preview always use page print to return printed pages early so
that it doesn't need to wait for the entire document to finish.
These pages share the content with the final printed document. So we
should use the same pdf compositor instance for compositing such pages
and document. Thus, the compositor service needs to handle multiple
requests in one instance.

BUG= 455764 

Change-Id: I6fa093f811abc0577ee0ce2a059ab55958f18540
Reviewed-on: https://chromium-review.googlesource.com/887961
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535237}
[modify] https://crrev.com/bc33ea5ed7dbbea75d0743a7c4558d7be827a7b0/components/printing/browser/print_composite_client.cc
[modify] https://crrev.com/bc33ea5ed7dbbea75d0743a7c4558d7be827a7b0/components/printing/browser/print_composite_client.h
[modify] https://crrev.com/bc33ea5ed7dbbea75d0743a7c4558d7be827a7b0/components/printing/service/pdf_compositor_impl.cc
[modify] https://crrev.com/bc33ea5ed7dbbea75d0743a7c4558d7be827a7b0/components/printing/service/pdf_compositor_impl.h
[modify] https://crrev.com/bc33ea5ed7dbbea75d0743a7c4558d7be827a7b0/components/printing/service/pdf_compositor_impl_unittest.cc

Project Member

Comment 59 by bugdroid1@chromium.org, Feb 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a3533592984bdb788d1335a223b37e125a07c99c

commit a3533592984bdb788d1335a223b37e125a07c99c
Author: Wei Li <weili@chromium.org>
Date: Mon Feb 12 19:16:28 2018

Set up mac v2 sandbox policy for pdf compositor

Pdf compositor service composites contents printed from different
renderer process into a complete pdf document. This is needed for
general printing when site isolation is enabled, because a web page with
out of process iframes may be rendered in multiple renderers.

Therefore, pdf compositor service needs to access font access.
This CL set up pdf compositor service's own seatbelt policy.

BUG= 809763 ,  455764 

Change-Id: I4a78ef793c1ea5e52b167a74fd02091f197bd61f
Reviewed-on: https://chromium-review.googlesource.com/912316
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536153}
[modify] https://crrev.com/a3533592984bdb788d1335a223b37e125a07c99c/content/browser/child_process_launcher_helper_mac.cc
[modify] https://crrev.com/a3533592984bdb788d1335a223b37e125a07c99c/services/service_manager/sandbox/mac/BUILD.gn
[add] https://crrev.com/a3533592984bdb788d1335a223b37e125a07c99c/services/service_manager/sandbox/mac/pdf_compositor.sb

Project Member

Comment 60 by bugdroid1@chromium.org, Feb 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5bb65974912fe376b6d97b64ed71c8b1f5410d29

commit 5bb65974912fe376b6d97b64ed71c8b1f5410d29
Author: Wei Li <weili@chromium.org>
Date: Wed Feb 14 03:07:58 2018

Support OOPIF printing in browser

Allow browser side to handle subframe printing message and notify the
renderer of the subframe to print its content. Add communications with
pdf compositor service to compose the final content.

The blink side of change is at crrev.com/c/818525. The high level
design doc is at goo.gl/CF1RUy

BUG= 455764 

Change-Id: I1a039a5f76e186b34b54dba6d974f5f41d1a6550
Reviewed-on: https://chromium-review.googlesource.com/822155
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536629}
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/chrome/browser/printing/print_browsertest.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/chrome/browser/printing/print_preview_message_handler.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/chrome/browser/ui/browser.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/chrome/browser/ui/browser.h
[add] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/chrome/test/data/printing/chain_child_iframe.html
[add] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/chrome/test/data/printing/content_with_iframe.html
[add] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/chrome/test/data/printing/content_with_iframe_chain.html
[add] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/chrome/test/data/printing/content_with_iframe_loop.html
[add] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/chrome/test/data/printing/loop_child_iframe.html
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/components/printing/browser/BUILD.gn
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/components/printing/browser/DEPS
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/components/printing/browser/print_composite_client.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/components/printing/browser/print_composite_client.h
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/components/printing/common/print_messages.h
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/components/printing/renderer/print_render_frame_helper.h
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/content/browser/frame_host/render_frame_host_delegate.h
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/content/browser/frame_host/render_frame_proxy_host.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/content/browser/frame_host/render_frame_proxy_host.h
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/content/browser/web_contents/web_contents_impl.h
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/content/common/frame_messages.h
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/content/public/browser/render_frame_host.h
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/content/public/browser/web_contents_delegate.h
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/printing/common/pdf_metafile_utils.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/printing/common/pdf_metafile_utils.h
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/printing/pdf_metafile_skia.cc
[modify] https://crrev.com/5bb65974912fe376b6d97b64ed71c8b1f5410d29/printing/pdf_metafile_skia.h

Project Member

Comment 61 by bugdroid1@chromium.org, Feb 15 2018

Labels: merge-merged-3325
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d608af8f049339534ac68adaca1d4253068b486f

commit d608af8f049339534ac68adaca1d4253068b486f
Author: Wei Li <weili@chromium.org>
Date: Thu Feb 15 21:27:49 2018

Set up mac v2 sandbox policy for pdf compositor

Pdf compositor service composites contents printed from different
renderer process into a complete pdf document. This is needed for
general printing when site isolation is enabled, because a web page with
out of process iframes may be rendered in multiple renderers.

Therefore, pdf compositor service needs to access font access.
This CL set up pdf compositor service's own seatbelt policy.

BUG= 809763 ,  455764 

Change-Id: I4a78ef793c1ea5e52b167a74fd02091f197bd61f
Reviewed-on: https://chromium-review.googlesource.com/912316
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#536153}(cherry picked from commit a3533592984bdb788d1335a223b37e125a07c99c)
Reviewed-on: https://chromium-review.googlesource.com/922881
Reviewed-by: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#480}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
[modify] https://crrev.com/d608af8f049339534ac68adaca1d4253068b486f/content/browser/child_process_launcher_helper_mac.cc
[modify] https://crrev.com/d608af8f049339534ac68adaca1d4253068b486f/services/service_manager/sandbox/mac/BUILD.gn
[add] https://crrev.com/d608af8f049339534ac68adaca1d4253068b486f/services/service_manager/sandbox/mac/pdf_compositor.sb

Project Member

Comment 62 by bugdroid1@chromium.org, Feb 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb

commit ef052a2f598059f95ff7151e3b62fd2a8a3b9abb
Author: Wei Li <weili@chromium.org>
Date: Fri Feb 16 07:17:35 2018

Add support for OOPIF printing in renderer

These mainly include painting placeholders for cross process subframes,
sending messages to browser to inform printing such subframes,
serialization and deserialization of printed content, and compositing
these contents into the final result.

The high level design doc is at goo.gl/CF1RUy, and browser side change
is at https:/crrev.com/c/822155.

BUG= 455764 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I15066f46da41d416356cad7392efb669b5f9f024
Reviewed-on: https://chromium-review.googlesource.com/838512
Reviewed-by: Khushal <khushalsagar@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: vmpstr <vmpstr@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537243}
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/cc/paint/skia_paint_canvas.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/cc/paint/skia_paint_canvas.h
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/chrome/browser/chromeos/arc/print/arc_print_service.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/chrome/browser/printing/print_browsertest.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/components/printing/browser/print_composite_client.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/components/printing/renderer/print_render_frame_helper.h
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/components/printing/renderer/print_render_frame_helper_linux.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/components/printing/service/pdf_compositor_impl.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/components/printing/test/mock_printer.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/content/renderer/render_frame_proxy.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/content/renderer/render_frame_proxy.h
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/printing/common/pdf_metafile_utils.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/printing/common/pdf_metafile_utils.h
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/printing/pdf_metafile_skia.cc
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/printing/pdf_metafile_skia.h
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/third_party/WebKit/Source/core/frame/RemoteFrameClient.h
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/third_party/WebKit/Source/core/frame/RemoteFrameClientImpl.cpp
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/third_party/WebKit/Source/core/frame/RemoteFrameClientImpl.h
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/third_party/WebKit/Source/core/frame/RemoteFrameView.h
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/third_party/WebKit/Source/core/loader/EmptyClients.h
[modify] https://crrev.com/ef052a2f598059f95ff7151e3b62fd2a8a3b9abb/third_party/WebKit/public/web/WebRemoteFrameClient.h

Project Member

Comment 63 by bugdroid1@chromium.org, Feb 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/39d52aa5aa7f9197e1937749d164dcc77af352e7

commit 39d52aa5aa7f9197e1937749d164dcc77af352e7
Author: Alexander Alekseev <alemate@chromium.org>
Date: Sat Feb 17 00:44:51 2018

Revert "Add support for OOPIF printing in renderer"

This reverts commit ef052a2f598059f95ff7151e3b62fd2a8a3b9abb.

Reason for revert: this (with the previous CL 648979) brpoke builds for devices that do not have CUPS.

Original change's description:
> Add support for OOPIF printing in renderer
> 
> These mainly include painting placeholders for cross process subframes,
> sending messages to browser to inform printing such subframes,
> serialization and deserialization of printed content, and compositing
> these contents into the final result.
> 
> The high level design doc is at goo.gl/CF1RUy, and browser side change
> is at https:/crrev.com/c/822155.
> 
> BUG= 455764 
> 
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
> Change-Id: I15066f46da41d416356cad7392efb669b5f9f024
> Reviewed-on: https://chromium-review.googlesource.com/838512
> Reviewed-by: Khushal <khushalsagar@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Reviewed-by: vmpstr <vmpstr@chromium.org>
> Commit-Queue: Wei Li <weili@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#537243}

TBR=dcheng@chromium.org,thestig@chromium.org,weili@chromium.org,vmpstr@chromium.org,alexmos@chromium.org,khushalsagar@chromium.org

Change-Id: I58a03469bf216957f190e23a3795de472ca58402
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  455764 , 813246
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/924486
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Commit-Queue: Alexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537484}
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/cc/paint/skia_paint_canvas.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/cc/paint/skia_paint_canvas.h
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/chrome/browser/chromeos/arc/print/arc_print_service.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/chrome/browser/printing/print_browsertest.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/components/printing/browser/print_composite_client.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/components/printing/renderer/print_render_frame_helper.h
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/components/printing/renderer/print_render_frame_helper_linux.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/components/printing/service/pdf_compositor_impl.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/components/printing/test/mock_printer.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/content/renderer/render_frame_proxy.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/content/renderer/render_frame_proxy.h
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/printing/common/pdf_metafile_utils.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/printing/common/pdf_metafile_utils.h
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/printing/pdf_metafile_skia.cc
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/printing/pdf_metafile_skia.h
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/third_party/WebKit/Source/core/frame/RemoteFrameClient.h
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/third_party/WebKit/Source/core/frame/RemoteFrameClientImpl.cpp
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/third_party/WebKit/Source/core/frame/RemoteFrameClientImpl.h
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/third_party/WebKit/Source/core/frame/RemoteFrameView.h
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/third_party/WebKit/Source/core/loader/EmptyClients.h
[modify] https://crrev.com/39d52aa5aa7f9197e1937749d164dcc77af352e7/third_party/WebKit/public/web/WebRemoteFrameClient.h

Comment 64 by weili@chromium.org, Feb 17 2018

Blockedon: -769479
Project Member

Comment 65 by bugdroid1@chromium.org, Feb 17 2018

Labels: merge-merged-3350
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f220925778aec216be8f74603dbc45c28f7f1f18

commit f220925778aec216be8f74603dbc45c28f7f1f18
Author: Alexander Alekseev <alemate@chromium.org>
Date: Sat Feb 17 07:51:52 2018

Revert "Add support for OOPIF printing in renderer"

This reverts commit ef052a2f598059f95ff7151e3b62fd2a8a3b9abb.

Reason for revert: this (with the previous CL 648979) brpoke builds for devices that do not have CUPS.

Original change's description:
> Add support for OOPIF printing in renderer
>
> These mainly include painting placeholders for cross process subframes,
> sending messages to browser to inform printing such subframes,
> serialization and deserialization of printed content, and compositing
> these contents into the final result.
>
> The high level design doc is at goo.gl/CF1RUy, and browser side change
> is at https:/crrev.com/c/822155.
>
> BUG= 455764 
>
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
> Change-Id: I15066f46da41d416356cad7392efb669b5f9f024
> Reviewed-on: https://chromium-review.googlesource.com/838512
> Reviewed-by: Khushal <khushalsagar@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
> Reviewed-by: vmpstr <vmpstr@chromium.org>
> Commit-Queue: Wei Li <weili@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#537243}

TBR=alemate@chromium.org, alexmos@chromium.org, dcheng@chromium.org, khushalsagar@chromium.org, thestig@chromium.org, vmpstr@chromium.org, weili@chromium.org

(cherry picked from commit 39d52aa5aa7f9197e1937749d164dcc77af352e7)

Change-Id: I58a03469bf216957f190e23a3795de472ca58402
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  455764 , 813246
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/924486
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Commit-Queue: Alexander Alekseev <alemate@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#537484}
Reviewed-on: https://chromium-review.googlesource.com/924400
Cr-Commit-Position: refs/branch-heads/3350@{#3}
Cr-Branched-From: 2b1109ab0cd74dabb255f79029326f1ddbae6349-refs/heads/master@{#537342}
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/cc/paint/skia_paint_canvas.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/cc/paint/skia_paint_canvas.h
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/chrome/browser/chromeos/arc/print/arc_print_service.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/chrome/browser/printing/print_browsertest.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/chrome/browser/printing/print_view_manager_base.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/components/printing/browser/print_composite_client.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/components/printing/renderer/print_render_frame_helper.h
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/components/printing/renderer/print_render_frame_helper_linux.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/components/printing/service/pdf_compositor_impl.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/components/printing/test/mock_printer.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/content/renderer/render_frame_proxy.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/content/renderer/render_frame_proxy.h
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/printing/common/pdf_metafile_utils.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/printing/common/pdf_metafile_utils.h
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/printing/pdf_metafile_skia.cc
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/printing/pdf_metafile_skia.h
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/third_party/WebKit/Source/core/frame/RemoteFrameClient.h
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/third_party/WebKit/Source/core/frame/RemoteFrameClientImpl.cpp
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/third_party/WebKit/Source/core/frame/RemoteFrameClientImpl.h
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/third_party/WebKit/Source/core/frame/RemoteFrameView.cpp
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/third_party/WebKit/Source/core/frame/RemoteFrameView.h
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/third_party/WebKit/Source/core/loader/EmptyClients.h
[modify] https://crrev.com/f220925778aec216be8f74603dbc45c28f7f1f18/third_party/WebKit/public/web/WebRemoteFrameClient.h

Comment 66 by weili@chromium.org, Feb 17 2018

FYI, Arc printing broke the ChromeOS build. Our CL was reverted so they can have a clean revert. I relanded https://chromium-review.googlesource.com/c/chromium/src/+/924566
Project Member

Comment 67 by bugdroid1@chromium.org, Feb 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/00b5593b50a10f363c9128f25f0499e1ce1f3bf1

commit 00b5593b50a10f363c9128f25f0499e1ce1f3bf1
Author: Wei Li <weili@chromium.org>
Date: Fri Feb 23 01:23:14 2018

Support subframe printing without pagination

When printing a cross process subframe such as an out-of-process
iframe, the content in that frame should not fit into a page size.
Instead it should be constrained by its parent. In addition, if it
being scrolled, printing should start from the scrolled offset.

This CL passes in and through a cross process subframe flag to
indicate such case, for which we don't force printing layout
or pagination. So it can be printed as is.
Also in this CL, SetPrinting() is refactored into StartPrinting()
and EndPrinting() to make the purposes of the APIs and their
parameters more clear.

BUG= 455764 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I9dc67068bf305a580835cb4d11666d09ff4d449a
Reviewed-on: https://chromium-review.googlesource.com/923210
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538653}
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/css/StyleEngineTest.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/dom/DocumentTest.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/frame/LocalFrame.h
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/frame/LocalFrameView.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/page/PrintContext.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/page/PrintContext.h
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/page/PrintContextTest.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/Source/core/paint/TextPainterTest.cpp
[modify] https://crrev.com/00b5593b50a10f363c9128f25f0499e1ce1f3bf1/third_party/WebKit/public/web/WebPrintParams.h

Project Member

Comment 68 by bugdroid1@chromium.org, Feb 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6fc667a8cc13fc0df7aae797b3be06a10b635909

commit 6fc667a8cc13fc0df7aae797b3be06a10b635909
Author: Wei Li <weili@chromium.org>
Date: Tue Feb 27 00:13:58 2018

Enable oopif printing for site isolation

Properly gate oopif printing for site isolation flag or feature, or
top document isolation. Previously we missed site isolation feature.

BUG= 455764 

Change-Id: I05a1b373c6186c29f22210bfa2013302f3664c79
Reviewed-on: https://chromium-review.googlesource.com/898504
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539323}
[modify] https://crrev.com/6fc667a8cc13fc0df7aae797b3be06a10b635909/components/printing/browser/print_manager_utils.cc

Comment 69 by weili@chromium.org, Feb 27 2018

Blockedon: -734815

Comment 70 by weili@chromium.org, Feb 27 2018

Status: Fixed (was: Started)

Sign in to add a comment