On Apr 17, 9:54 pm, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
> krithika wrote:
> > In my PrintEngine after having identified the table cell at which page
> > break occurs I try to insert a style attribute to parent <tr> as shown
> > <tr style="page-break-before:always">.
>
> > I found that reflow does not occur automatically.
>
> How do you insert the attribute?
>
> And note that print presentations are only reflown once.  So if you're 
> modifying
> the DOM you'll need to create a new print presentation to see the results.
>
> > 1. Is is possible to reflow the table whose row style atrribute has
> > changed even when we are in print preview mode?.
>
> No.
>
> > 2. Will methods like frame->AttributeChanged help.
>
> No.
>
> -Boris


This is how I insert

from tablerowgroupframe I get the content and the do the following.
1.For tablegropuFrame type I set attribute to tr.

 styleName.Assign(NS_LITERAL_STRING("style"));
 nsCOMPtr<nsIAtom> styleAtom = do_GetAtom(styleName);

 styleValue.Assign(NS_LITERAL_STRING("page-break-before:always;"));
 nsresult rv = content->SetAttr(kNameSpaceID_XHTML,
styleAtom,styleValue, PR_TRUE);

2. In case of text nodes I use nsIRange to insert a span element with
page-break-before style.In either case it does not reflow.

Please let me know how do I recreate the print presentations after I
insert the attribute.

Thanks for the response.

regards,
Krithika

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

Reply via email to