Bug 24299

Summary: combining border-right, border-left in table-cells with background-color in table-rows
Product: Fop - Now in Jira Reporter: Bernhard <bernhard.maehr>
Component: generalAssignee: fop-dev
Status: CLOSED FIXED    
Severity: normal CC: lolive, thilo.s
Priority: P3    
Version: 0.20.5   
Target Milestone: ---   
Hardware: PC   
OS: other   
URL: http://www.dorner.at
Attachments: screenshot of the bug visible in acrobat

Description Bernhard 2003-10-31 16:32:45 UTC
<fo:table font-family="Helvetica" font-size="7pt" border-collapse="collapse">

If you use background-color on a table-row like this: 
<fo:table-row font-family="Helvetica" font-size="7pt">
<xsl:attribute name="background-
color"><xsl:text>#EEEEEE</xsl:text></xsl:attribute>

and leave this out every second row

... and use table-cell like this 
		<fo:table-cell padding-left="2pt" padding-top="1pt" padding-
right="2pt" border-left="solid 0.5pt black" border-right="solid 0.5pt black">
			<fo:block overflow="hidden">
				<xsl:value-of 
select="./@expoklassgrp_kurz_text"/>
			</fo:block>
		</fo:table-cell>

each row and each cell then you get little small spaces in the borders. You can 
see them best when printing on a laserjet but you can see them also on a 
deskjet if you look quite precisely.

This is only if you use background-color on the row. In all other cases the 
border works perfect!

It is ok if i use the same code but without the attribute background-color.
Comment 1 Bernhard 2003-11-04 17:50:32 UTC
Created attachment 8925 [details]
screenshot of the bug visible in acrobat
Comment 2 Bernhard 2003-11-04 17:56:11 UTC
You can see the bug in acrobat 5.1 when you zoom in to 1600%.
Comment 3 Armin Vogt 2004-06-02 21:18:51 UTC
After some code study ... , problem occured to me:
the background rectangle gets drawn over the border of the cell to the left and
to the top. those borders get drawn first. the background rect dimension and
position does not account for any existing borders (see
AbstractRenderer.doBackground()). thats no problem for the current cell since
its borders get drawn later.

border computations are ok.
background-color rectangle is wrong.

Problem: the cell needs to know if its left or its upper neighbor have borders!
Only then does it have to make the background rect smaller.

Comment 4 Armin Vogt 2004-06-02 21:24:12 UTC
*** Bug 6929 has been marked as a duplicate of this bug. ***
Comment 5 Armin Vogt 2004-06-02 21:26:35 UTC
*** Bug 14122 has been marked as a duplicate of this bug. ***
Comment 6 Pascal Sancho 2007-11-20 00:48:56 UTC
Fixed in FOP 0.94 and probably earlier versions
Comment 7 Glenn Adams 2012-04-01 06:47:43 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed