L. David Baron wrote:
We support multiple presentations of the same document.  We
currently use this for printing.  We should probably be using it for
print preview if print preview weren't a total hack (we actually
might be).  In theory we could also use it for things like multiple
views in editors, although nobody's done that.

One school of thought says we should remove this and switch printing
to clone the document.  The other says that this doesn't hurt us
much and can be quite useful.

I've hummed and hawed over this question myself. I used to think that multiple presentations was incompatible with XBL, but I was wrong. Still, there are DOM interfaces that don't account for multiple views/presentations (e.g. offset*), and adding that support would inevitably complicate the Web programming model.

Currently things are basically OK as long as non-default views don't support scripting, and that's true for us since our only non-default view is for printing. But for printing and print preview I think we should just clone the DOM, because that gives us other major benefits. This could be used in other non-dynamic situations that need multiple presentations.

Another issue is rendering replication via SVG 'use' or table header/footer repetition. That sounds marginal but it's a useful capability that I think will creep in in other contexts. If we need to replicate an IFRAME, should that use the multiple presentation mechanism? Personally, I think not. I think content replication should work by allowing multiple primary frames per content node, so most places that do GetPrimaryFrameFor will need to be turned into a loop over a primary frame list. Then we could support replicated subdocuments by creating multiple root frames for a document. Yes, this would be a lot like multiple presentations, but it would share mechanism with intra-document rendering replication, and it's less general (thus hopefully simpler) that multiple presentations because a lot of properties are forced to be the same across replicas --- style sheets, output device, etc.

This frame replication mechanism would also let you build a multi-paned editor. You just wouldn't be able to apply different style sheets to the panes. You would be able to style things differently in different panes, though, I think, using rules like "#pane1 p { ... }".

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

Reply via email to