On 04/24/2012 02:31 PM, Julian Viereck wrote:
> * the function might call `dc->BeginPage()` multiple times.
>   Shouldn't this function add only one page to the output?
>   Is this a bug or a feature?

AFAICT, that code only triggers multiple BeginPage calls if we're doing
Print Selection.

Print Selection is special.  Rather than explicitly paginating our
content into separate page frames, as we normally do, we instead render
the entire selected region onto one giant page frame, and then we paint
that onto multiple physical pages. (This mostly works, but it can cause
problems if we pick a bad spot to split[1].)

So -- when we're doing Print Selection, we end up only printing a single
(tall) page _frame_, so we only need one call to PrintNextPage(). But we
print that frame onto multiple *physical* pages, so we end up calling
BeginPage multiple times.

(I'm not sure about your other questions, offhand.)

~Daniel

[1] e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=240625
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to