Bug 43712 - Collapsed borders on tables in tables not considered to lie half in the before and after margins
Summary: Collapsed borders on tables in tables not considered to lie half in the befor...
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: page-master/layout (show other bugs)
Version: trunk
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-26 14:14 UTC by Isaac Shabtay
Modified: 2012-04-01 07:06 UTC (History)
0 users



Attachments
XSL-FO that demonstrates the problem (29.55 KB, text/plain)
2007-10-26 14:15 UTC, Isaac Shabtay
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Isaac Shabtay 2007-10-26 14:14:18 UTC
This may be related to bug 43616. However, 43616 has already been fixed (I am
using rev-588275).

The attached XSL-FO, converted to PDF, will have the last paragraph broken to
the next page even though there still is plenty of space in the current page for
the extra two lines:
Comment 1 Isaac Shabtay 2007-10-26 14:15:25 UTC
Created attachment 21052 [details]
XSL-FO that demonstrates the problem
Comment 2 Vincent Hennebert 2007-10-29 04:17:00 UTC
Hi Isaac,

thanks for reporting the problem. This is not related to bug 43616. I strongly
suspect that this is due to the fact that collapsed borders are not considered
to lie half in the before and after margin for tables which are inside another
table. You can circumvent the problem by specifying border-collapse="separate"
on the inner tables. You will have to rework your border specifications a bit,
but you should still be able to achieve the layout you need. Please ask on
fop-users if you need more explanations.

Details: the merging algorithm seems to forget that the border-before/after on a
table with collapsing borders lie half in the margin. Thus the total size of the
merged sequence is bigger than expected, and overflows the page size. Whereas
when adding the areas, borders are actually put half in the margins, so that on
the visual results it looks like there is still room for the last 2 lines.
Comment 3 Vincent Hennebert 2007-11-27 03:17:50 UTC
My bad, the problem was totally unrelated...

border-collapse is an inheritable property, so if it is set to "separate" on an
outer table it will also be set to "separate" on inner tables. I've checked and
it works properly.

The problem here was due to a bug that I fixed in revision 596727: the height of
some elements was counted twice, once in a glue and once in a box. The attached
sample looks fine now.

Vincent
Comment 4 Glenn Adams 2012-04-01 07:06:10 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed