On 03/15/2012 05:54 PM, Zack Weinberg wrote:
On 03/15/2012 07:52 AM, [email protected] wrote:
IIUC you're asking that we implement the default behavior for CSS3
Paged Media margin boxes:

[...]

Will that do the trick for the pdf.js use cases?

Together with a new callback for printing canvas graphics, this
looks very promising.

Agree.

I'm still a little bit concerned about blocking the UI for printing
(esp. for large documents which is common if you print some PDF),

The current printing logic (start with layout/printing/nsPrintEngine) is
a two-phase operation.  First we reflow the entire document with
pagination, uninterruptibly; second we paint each page in succession,
allowing the UI to process events but only in between pages.

This is already a cause of significant jank, and it would be great to do
something about it; but it might be quite a lot of work.  I had a
conversation with Boris about this the other week, I think in
dev-platform; you might find it instructive.

Right now, execution of page JS is suspended for the course of the print
operation.
Well, it is not expected that any script runs in the cloned document.

(Within the cloned document, that is.  Although there are
still comments within layout/printing that suggest that the
document-cloning project is incomplete.)

IIRC, the only thing that is incomplete is that plugin handling could
be better.

 If we want to allow the UI to
process events *during* the painting of one page, your "paint this
canvas now" API is going to need some sort of interruptibility.  Off the
top of my head I don't know what that ought to look like.

The current print preview arrangement is sort of an afterthought to
normal printing.  I don't know what its memory requirements are like.
print preview is pretty simple. You just create a paginated
prescontext/layout for the cloned document, and show it otherwise like
a normal document.



Basically what I'm saying is there's a lot of work to be done here but
it's work we need to do anyway :)

zw


_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to