520c0da81e00f2030873f6ca0dfae8bfe9362370: Bug 1418918. P1 - remove unused FlushPartialBlock(). draft
JW Wang <jwwang@mozilla.com> - Mon, 20 Nov 2017 16:00:22 +0800 - rev 701106
Push 90073 by jwwang@mozilla.com at Tue, 21 Nov 2017 08:07:51 +0000
Bug 1418918. P1 - remove unused FlushPartialBlock(). MozReview-Commit-ID: GSda1KfPWXE
89ea294618f7621b9d0f7e603c818514bcc090c3: Bug 1418917. P2 - NotifyClientSuspended() should check mClosed. draft
JW Wang <jwwang@mozilla.com> - Mon, 20 Nov 2017 14:21:22 +0800 - rev 701105
Push 90073 by jwwang@mozilla.com at Tue, 21 Nov 2017 08:07:51 +0000
Bug 1418917. P2 - NotifyClientSuspended() should check mClosed. MozReview-Commit-ID: 9mBPwfyfWCV
abaf1533a24654f0cae0645c00cfbf3a325abe86: Bug 1418917. P1 - run some functions off the main thread. draft
JW Wang <jwwang@mozilla.com> - Thu, 16 Nov 2017 15:41:36 +0800 - rev 701104
Push 90073 by jwwang@mozilla.com at Tue, 21 Nov 2017 08:07:51 +0000
Bug 1418917. P1 - run some functions off the main thread. MozReview-Commit-ID: Fn9OveV69hX
45660d44a102a4264dd654f2cabb18de645f8be2: Bug 1399787 - Part 16. Add a preference in all.js to enable/disable print a document by pdf encoder and pdfium. draft
cku <cku@mozilla.com> - Tue, 21 Nov 2017 14:53:48 +0800 - rev 701103
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 16. Add a preference in all.js to enable/disable print a document by pdf encoder and pdfium. MozReview-Commit-ID: CJ1LszuC1gB
453f9ee4fdb69980c50b49728a9e9b2553eb3b23: Bug 1399787 - Part 16. Hide function table in PDFiumEngineShim.cpp. draft
cku <cku@mozilla.com> - Wed, 01 Nov 2017 21:51:20 +0800 - rev 701102
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 16. Hide function table in PDFiumEngineShim.cpp. This is to make the header file more concise. MozReview-Commit-ID: 7RFkppBdvbU
3985b1de0e02c7694e52b37b1d17c7c5ab21f6c3: Bug 1399787 - Part 15. Handle ipc channel broken. draft
cku <cku@mozilla.com> - Mon, 06 Nov 2017 22:12:31 +0800 - rev 701101
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 15. Handle ipc channel broken. MozReview-Commit-ID: 6VfIbstJ6WN
8bef6a47f6af816abdd2cd862248609f2f8da6d0: Bug 1399787 - Part 14. Do not use ipc calls after the channel was destroyed. draft
cku <cku@mozilla.com> - Mon, 23 Oct 2017 15:57:18 +0800 - rev 701100
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 14. Do not use ipc calls after the channel was destroyed. If we force nsDeviceContextSpecWin::BeginDocument return NS_ERROR_FAILURE, then the channel between RemotePrintJobParent and RemotePrintJobChild will be close at [1]. RemotePrintJobChild keeps using ipc calls after the channel is broken and then hits this assertion. PS: We always hits this assertion by forcing nsDeviceContextSpecWin::BeginDocument returning NS_ERROR_FAILURE. It's not relative to the change we made in previous patches. [1] https://hg.mozilla.org/mozilla-central/file/b186fddce27f/layout/printing/ipc/RemotePrintJobParent.cpp#l44 MozReview-Commit-ID: 79mZBf301nb
7d5d7824565669df13d1a903d58f771d381a9de2: Bug 1399787 - Part 13. Handle AbortDocument. draft
cku <cku@mozilla.com> - Sun, 05 Nov 2017 15:34:54 +0800 - rev 701099
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 13. Handle AbortDocument. While aborting conversion, we need to make sure there is no coversion task executing in the PDFium process before destroying it. MozReview-Commit-ID: 3Iqhe8KmYv2
500c9361805454f81409af41bd9cd894fc9aa0cf: Bug 1399787 - Part 12. Delay dispatching FinalizePrint message until the last page was processed. draft
cku <cku@mozilla.com> - Mon, 06 Nov 2017 16:28:51 +0800 - rev 701098
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 12. Delay dispatching FinalizePrint message until the last page was processed. For the last page, here is the final three messages sent between the content process, RemotePrintJobChild, and the chrome process, RemotePrintJobParent, for printing: 1. The content process sends *ProcessPage* to the chrome process by SendProcessPrint to request the chrome process printing the last page. 2. The content process sends *FinalizePrint* to the chrome process by SendFinalizePrint to notify the chrome that there is no more print request, the chrome process can release interal resource now. 3. The content process receive PageProcessed message from the chrome process. This calling sequence is fine for sync style PrintTarget, even though FinalizePrint message was sent out a bit too ealy, but since a sync PrintTarget complete print task right after receiving *ProcessPage* message in #1, send FinalizePrint before getting PageProcessed response is no harm. But this message dispatching sequence does cause a problem for async style PrintTargetEMF. After getting a message sent in #2, PrintTargetEMF release all resources before getting a EMF conversion response from the PDFium process. So the last page can not be printed correctly. This patch reorder the #2 and #3 message, that is to send FinalizePrint after the content process received PageProcessed message of the last page. MozReview-Commit-ID: 9ZVSrFnuHBU
f8a0d9fb080e902d56b9558565034466186fa74c: Bug 1399787 - Part 11.c. Using PrintTargetEMF on windows if skia-pdf is enable. draft
cku <cku@mozilla.com> - Tue, 14 Nov 2017 13:57:11 +0800 - rev 701097
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 11.c. Using PrintTargetEMF on windows if skia-pdf is enable. MozReview-Commit-ID: Hx94fqGJFz6
980ce7d3bf24c9deaa52e1abe2b8fd77a004c490: Bug 1399787 - Part 11.b. Print chrome documents by PrintTargetEMF. draft
cku <cku@mozilla.com> - Mon, 13 Nov 2017 15:29:32 +0800 - rev 701096
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 11.b. Print chrome documents by PrintTargetEMF. MozReview-Commit-ID: 9BjQ8PIZAWL
8ed0606f3b7ea08149dbbc89dc2da432a803d3e0: Bug 1399787 - Part 11.a. Print content documents by PrintTargetEMF. draft
cku <cku@mozilla.com> - Sun, 05 Nov 2017 04:36:37 +0800 - rev 701095
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 11.a. Print content documents by PrintTargetEMF. Before we introduce PrintTargetEMF, all PrintTargets finish page printing task before the end of PrintTarget::EndPage(). Unlike others, a page printing in PrintTargetEMF is done after receiving an async callback from the pdfium process. So we have both async and sync page printing behavior now. This patch is trying to make both of them work correctly while priting a content document. MozReview-Commit-ID: 2PHJToFlvtu
01e03afcc5a3197e12b780feecf41b6a1ee285c2: Bug 1399787 - Part 10. Convert PDF into EMF. draft
cku <cku@mozilla.com> - Sun, 05 Nov 2017 03:06:04 +0800 - rev 701094
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 10. Convert PDF into EMF. We integrate PrintTargetEMF with the PDFium process to convert PDF into EMF in this patch. MozReview-Commit-ID: 5F0setrL94n
89f084c94d9d97ba2e1caa0af879676c04c768bc: Bug 1399787 - Part 9. Sandbox the PDFium process. draft
cku <cku@mozilla.com> - Wed, 18 Oct 2017 20:52:45 +0800 - rev 701093
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 9. Sandbox the PDFium process. MozReview-Commit-ID: 6ED7EPZvOMR
404686f658342130ea0f531d78016316779e49bc: Bug 1399787 - Part 8. Open PDFium protocol channel. draft
cku <cku@mozilla.com> - Tue, 17 Oct 2017 12:48:30 +0800 - rev 701092
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 8. Open PDFium protocol channel. MozReview-Commit-ID: F9W9ykEtVmK
efcd4a0949ed903a1934e4c77bccffeda839accd: Bug 1399787 - Part 7. Have PrintTargetEMF launch the PDFium process. draft
cku <cku@mozilla.com> - Sun, 05 Nov 2017 02:57:13 +0800 - rev 701091
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 7. Have PrintTargetEMF launch the PDFium process. MozReview-Commit-ID: CVfB81ifV2p
5f1609b91ba80d071e01f5128265bd94bf1bfe7b: Bug 1399787 - Part 6. Implement PrintTargetEMF. draft
cku <cku@mozilla.com> - Sun, 05 Nov 2017 02:05:25 +0800 - rev 701090
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 6. Implement PrintTargetEMF. A new subclass of PrintTarget. 1. It uses PrintTargetSkPDF to generate one PDF FileDescriptor for one page. 2. It then passes that FD to to PDFium process to convert PDF page to EMF content. Implementation of integration with PDFium actor is added in subsequent patches. MozReview-Commit-ID: EcuBJHRW8Wk
c14f9991d341b824931a89cf28737fa025437542: Bug 1399787 - Part 5. Implement the PDFium process. draft
cku <cku@mozilla.com> - Mon, 16 Oct 2017 16:22:07 +0800 - rev 701089
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 5. Implement the PDFium process. MozReview-Commit-ID: 502jB9DAeIC
b64719a8ed87e1091e2ae456e87e62e0ab53bcbd: Bug 1399787 - Part 4. Take out the code we landed in bug 1370488. draft
cku <cku@mozilla.com> - Sun, 05 Nov 2017 00:53:05 +0800 - rev 701088
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 4. Take out the code we landed in bug 1370488. To move EMF conversion job to a dedicated process, I will implement a new PrintTarget subclass, named PrintTargetEMF, to coordinate tasks among the content process, chrome process and PDFium process. All the code that we change in nsDeviceContextSpecWin is no longer needed. MozReview-Commit-ID: GgKZoB92WYE
4e8587cba5b21f1cdbd049dcc0860fde500444fb: Bug 1399787 - Part 3. Create a top level protocol for the PDFium process. draft
cku <cku@mozilla.com> - Fri, 13 Oct 2017 16:58:07 +0800 - rev 701087
Push 90072 by cku@mozilla.com at Tue, 21 Nov 2017 08:05:32 +0000
Bug 1399787 - Part 3. Create a top level protocol for the PDFium process. Define ipdl and actor classes. Implementation of actors is added in subsequent patches. Control flow: 1. A user starts a printing job. 2. We create a PrintTarget to print web content page by page. 3. When printing pages: a. PrintTarget, who lives in the chrome process, create a new FileDescriptor and pass that FD to the content process. b. The content process renders page contents into the given FD. c. PrintTarget render that FD, which contains only one page, into a PDF file. d. PrintTaget asks PDFium process to convert that PDF file into EMF contents by *ConvertToEMF* e. The PDFium process converts the given PDF into EMF contents and send back EMF contents by *ConvertToEMFDone* f. PrintTaget playbacks that EMF onto a printer DC. One page is printed! f. If all pages are printed, then finalize print job; Otherwise, loop back to #a. The control flow that we landed in bug 1370488 does not work like the flow I described above. In [1], we paint all pages into one single PDF file. After all pages are rendered into this PDF file, we finalize the current print job, which means the printing progress dialog is close. *Then* we start to convert that PDF into EMF and print each EMF page onto printer DC. We can not cancel this conversion task since the printing dialog is close, there is no UI allow us to do that. One more serious problem is: since the printing progress dialog is close, people think that printing is done, but actually it's not. Except move EMF conversion to a dedicated process, named PDFium process, I will also fix the behavior we landed in bug 1370488. [1] https://hg.mozilla.org/mozilla-central/rev/b611ec2a42bf MozReview-Commit-ID: JAnmNc3gAVK
(0) -300000 -100000 -30000 -10000 -3000 -1000 -300 -100 -50 -20 +20 +50 +100 +300 +1000 +3000 +10000 +30000 +100000 tip