On Thursday 29 March 2012 13:06:12 David Hyatt wrote:
> Do you have a bug for this work? I'm not really sure what you're trying to
> accomplish… avoiding page breaks in a table row does not seem correct to
> me.

See https://bugs.webkit.org/show_bug.cgi?id‚617

The reason is that without this patch / work, page breaks sometimes occur in
the middle of table rows, resulting in unreadable text garbage. If you doubt
it, I can change the example in the bug above a bit to visualize this.

Bye

> On Mar 29, 2012, at 8:23 AM, Milian Wolff wrote:
> > Hey there,
> >
> > I'm trying to write a unit test for my layouting patch, that prevents page
> > breaks in table rows. So far, I've extended the layoutTestController with
> > a
> > pageBreaksInElementById function, similar to pageNumberForElementById.
> >
> > The logic behind the implementation is basically an extended co
y of
> > PrintContext::pageNumberForElement, see e.g. [1].
> >
> > Now in my unit test, I call this function for every table row and "ensure"
> > that the return value is always 0, i.e. no page break. Turns out, that
> > this
> > does not work as expected: My table layouting code [2] takes the offset of
> > the surrounding table into account, and the visual result looks OK. The
> > unit test code ([1]) though apparently assumes absolute coordinates,
> > which (I think?!) box->pixelSnappedOffsetLeft() is *not*. What could be
> > used instead? Also, doesn't this also mean that the logic of
> > PrintContext::pageNumberForElement is flawed for nested elements that are
> > offsetted?
> >
> > Note btw. that the box does not have any layout state when called from
> > PrintContext::pageBreaksInElement, as such I cannot simply add a call to
> > RenderBlock::offsetFromLogicalTopOfFirstPage().
> >
> > Thanks
> >
> > [1]: http://paste.kde.org/448514/
> > [2]: http://paste.kde.org/448520/
--

ilian Wolff | [email protected] | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions

Attachment: p7sF3iZzrRGTr.p7s
Description: S/MIME cryptographic signature

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to