Bug 46363 - list items sometimes overflow the region-body
Summary: list items sometimes overflow the region-body
Status: NEW
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: page-master/layout (show other bugs)
Version: all
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
: 49608 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-08 04:22 UTC by Chris Dams
Modified: 2012-04-07 01:51 UTC (History)
1 user (show)



Attachments
fo file (13.59 KB, application/octet-stream)
2008-12-08 04:22 UTC, Chris Dams
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dams 2008-12-08 04:22:08 UTC
Created attachment 23002 [details]
fo file

Dear all,

When a page contains strechable spaces, it sometimes happens that a list item is allowed to overflow the region-body. See the attached *.fo file for an example. The page should have been broken before point 25 to fit on the page, but instead it is broken after this point and point 25 overflows the footer.

All the best,
Chris
Comment 1 Vincent Hennebert 2011-03-23 06:52:40 UTC
*** Bug 49608 has been marked as a duplicate of this bug. ***
Comment 2 Vincent Hennebert 2011-03-23 06:54:44 UTC
See simpler test case attached in bug #49608
Comment 3 Andreas L. Delmelle 2011-03-23 13:10:19 UTC
Without even looking at the code, I can almost feel what is the issue here (see also my notes about the partial cause for Bugzilla 49801): ElementListUtils.calcContentLength(), which is used in list-layout to generate the 'list-parts'.
During element-list buildup, this method calculates a content-length that does not take into account space-resolution (i.e. all the spaces are still unresolved SpaceElements).
By the time the algorithm has to compute the most optimal break, those elements will have been resolved. Some may have disappeared, others add a forced space of a certain width.

Something similar is bound to pop up for table-cells, sooner or later, as it also uses calcContentLength().

BTW: it just occurred to me that we may want to have that method return a MinOptMax, rather than an int. As such, it could more easily take into account stretchability of spaces, without necessarily having to know more about the actual breaks or space-resolution...?
Comment 4 Glenn Adams 2012-04-07 01:41:39 UTC
resetting P2 open bugs to P3 pending further review