While playing a bit with absolute positioned block container, I think
I stumbled into a little bug.

If there is a block-container with both width and height set, its
position can be correctly controlled using top and left (and indeed
there are many testcases checking that) but bottom and right do not
have any visible effect.

I'm attaching a simple file, whose expected output would show four
colored block-container adjacently placed 2x2 (I tried another
formatter, and it behaves as expected).

I did not investigate any deeper, but I noticed that in the area tree
xml we use only two attributes (top-position and left-position), and
they are 0 when the corresponding block-container has @bottom /

Tomorrow I'll work on this, obviously if no one arrives first or
convinces me that the right output is what we already get :-)

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
		<fo:simple-page-master master-name="simple" page-width="6in" page-height="5in" margin="1in">
	<fo:page-sequence master-reference="simple">
		<fo:flow flow-name="xsl-region-body">
			<fo:block font-size="48pt">position</fo:block>
			<fo:block font-size="48pt" text-align="right"><fo:inline>NOT</fo:inline> ok!</fo:block>
			<fo:block-container absolute-position="absolute" width="51pt" height="30pt" background-color="red" top="57pt" left="109pt">
			<fo:block-container absolute-position="absolute" width="51pt" height="30pt" background-color="yellow" top="57pt" right="77pt">
			<fo:block-container absolute-position="absolute" width="51pt" height="30pt" background-color="blue" bottom="99pt" left="109pt">
			<fo:block-container absolute-position="absolute" width="51pt" height="30pt" background-color="green" bottom="99pt" right="77pt">

Attachment: expectedOutput.pdf
Description: Adobe PDF document

Attachment: fopOutput.pdf
Description: Adobe PDF document

Reply via email to