diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-01-19 15:10:14 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-01-19 15:10:14 +0000 |
commit | 4a34763794b0293bbcf74a08f34d0035aeff61fe (patch) | |
tree | 5fbd7a0fd8b310a4ee4343fe697189f9131939eb /test | |
parent | 9a01ca2474cad035c82810d6b541cde6dbd896aa (diff) | |
download | xmlgraphics-fop-4a34763794b0293bbcf74a08f34d0035aeff61fe.tar.gz xmlgraphics-fop-4a34763794b0293bbcf74a08f34d0035aeff61fe.zip |
Following a clarification by the XSL FO SG, space traits are only set on the first and last area generated by an FO, and not on every area anymore.
For details, see: http://wiki.apache.org/xmlgraphics-fop/XslFoSpecificationUncertainties/SpaceTraits
Note: this change brings another issue in column balancing to light. That's the reason for disabling one of the tests. I wasn't able to find a quick fix there.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@370494 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
9 files changed, 39 insertions, 164 deletions
diff --git a/test/layoutengine/disabled-testcases.xml b/test/layoutengine/disabled-testcases.xml index 684e5c4c1..78ef2a7eb 100755 --- a/test/layoutengine/disabled-testcases.xml +++ b/test/layoutengine/disabled-testcases.xml @@ -260,6 +260,11 @@ content to disappear.</description> </testcase> <testcase> + <name>Column Balancing problems</name> + <file>region-body_column-count_bug36356.xml</file> + <description>Column balancing doesn't work as expected.</description> + </testcase> + <testcase> <name>No background-images on table-body</name> <file>table-body_background-image.xml</file> <description>The backgrounds of table-body, table-header, diff --git a/test/layoutengine/standard-testcases/block-container_space-before_space-after_1.xml b/test/layoutengine/standard-testcases/block-container_space-before_space-after_1.xml index 37b7b87c2..5397d516e 100644 --- a/test/layoutengine/standard-testcases/block-container_space-before_space-after_1.xml +++ b/test/layoutengine/standard-testcases/block-container_space-before_space-after_1.xml @@ -75,38 +75,20 @@ Two blocks, testing conditionality="discard". <box w="14400"/> <box w="14400"/> - <penalty w="0" p="INF"/> - <glue w="10000" y="0" z="10000"/> <penalty w="0" p="0"/> - <glue w="-30000" y="0" z="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000" y="0" z="20000"/> <box w="14400"/> - <penalty w="0" p="INF"/> - <glue w="10000" y="0" z="10000"/> <penalty w="0" p="0"/> - <glue w="-30000" y="0" z="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000" y="0" z="20000"/> <box w="14400"/> <!-- skip three more lines --> - <skip>8</skip> - <skip>8</skip> - <skip>8</skip> + <skip>2</skip> + <skip>2</skip> + <skip>2</skip> - <penalty w="0" p="INF"/> - <glue w="10000" y="0" z="10000"/> <penalty w="0" p="0"/> - <glue w="-30000" y="0" z="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000" y="0" z="20000"/> <box w="14400"/> <box w="14400"/> diff --git a/test/layoutengine/standard-testcases/block-container_space-before_space-after_2.xml b/test/layoutengine/standard-testcases/block-container_space-before_space-after_2.xml index d742b3e85..8ed83492e 100644 --- a/test/layoutengine/standard-testcases/block-container_space-before_space-after_2.xml +++ b/test/layoutengine/standard-testcases/block-container_space-before_space-after_2.xml @@ -18,13 +18,13 @@ <testcase> <info> <p> - This test checks block-level space properties. Demonstrates that spaces are repeated on every generated area. + This test checks block-level space properties. Demonstrates that spaces are only on the first (or last) generated area. </p> </info> <fo> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> <fo:layout-master-set> - <fo:simple-page-master master-name="normal" page-width="5in" page-height="30pt"> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="28pt"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> @@ -46,42 +46,23 @@ <box w="0"/> <penalty w="0" p="INF"/> <glue w="5000"/> + <box w="10000"/> <penalty w="0" p="0"/> - <glue w="-5000"/> - - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="5000"/> <box w="10000"/> <penalty w="0" p="0"/> - <glue w="-5000"/> - - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="5000"/> <box w="10000"/> <penalty w="0" p="0"/> - <glue w="-5000"/> - - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="5000"/> <box w="10000"/> <penalty w="0" p="0"/> - <glue w="-5000"/> - - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="5000"/> <box w="10000"/> <skip>3</skip> </element-list> <eval expected="3" xpath="count(//pageViewport)"/> <eval expected="5000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> - <eval expected="5000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> - <eval expected="5000" xpath="//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> + <true xpath="not(boolean(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/> + <true xpath="not(boolean(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/> <eval expected="1" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block)"/> <eval expected="1" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block)"/> <eval expected="1" xpath="count(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block)"/> diff --git a/test/layoutengine/standard-testcases/block_space-before_space-after_2.xml b/test/layoutengine/standard-testcases/block_space-before_space-after_2.xml index 0676277f9..4b2d67212 100644 --- a/test/layoutengine/standard-testcases/block_space-before_space-after_2.xml +++ b/test/layoutengine/standard-testcases/block_space-before_space-after_2.xml @@ -71,38 +71,20 @@ Two blocks, testing conditionality="discard". <box w="14400"/> <box w="14400"/> - <penalty w="0" p="INF"/> - <glue w="10000" y="0" z="10000"/> <penalty w="0" p="0"/> - <glue w="-30000" y="0" z="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000" y="0" z="20000"/> <box w="14400"/> - <penalty w="0" p="INF"/> - <glue w="10000" y="0" z="10000"/> <penalty w="0" p="0"/> - <glue w="-30000" y="0" z="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000" y="0" z="20000"/> <box w="14400"/> <!-- skip three more lines --> - <skip>8</skip> - <skip>8</skip> - <skip>8</skip> + <skip>2</skip> + <skip>2</skip> + <skip>2</skip> - <penalty w="0" p="INF"/> - <glue w="10000" y="0" z="10000"/> <penalty w="0" p="0"/> - <glue w="-30000" y="0" z="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000" y="0" z="20000"/> <box w="14400"/> <box w="14400"/> diff --git a/test/layoutengine/standard-testcases/block_space-before_space-after_4.xml b/test/layoutengine/standard-testcases/block_space-before_space-after_4.xml index 3d4fb9f58..d00e18cb4 100644 --- a/test/layoutengine/standard-testcases/block_space-before_space-after_4.xml +++ b/test/layoutengine/standard-testcases/block_space-before_space-after_4.xml @@ -18,13 +18,13 @@ <testcase> <info> <p> - This test checks block-level space properties. Demonstrates that spaces are repeated on every generated area. + This test checks block-level space properties. Demonstrates that space-before is only on the first generated area. </p> </info> <fo> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> <fo:layout-master-set> - <fo:simple-page-master master-name="normal" page-width="5in" page-height="30pt"> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="28pt"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> @@ -48,30 +48,22 @@ <glue w="5000"/> <box w="10000"/> <penalty w="0" p="0"/> - <glue w="-5000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="5000"/> <box w="10000"/> <penalty w="0" p="0"/> - <glue w="-5000"/> <!-- skip two more lines --> - <skip>6</skip> - <skip>6</skip> + <skip>2</skip> + <skip>2</skip> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="5000"/> <box w="10000"/> <skip>3</skip> </element-list> <eval expected="3" xpath="count(//pageViewport)"/> <eval expected="5000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> - <eval expected="5000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> - <eval expected="5000" xpath="//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> + <true xpath="not(boolean(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/> + <true xpath="not(boolean(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/> <eval expected="1" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block)"/> <eval expected="1" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block)"/> <eval expected="1" xpath="count(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block)"/> diff --git a/test/layoutengine/standard-testcases/block_space-before_space-after_6.xml b/test/layoutengine/standard-testcases/block_space-before_space-after_6.xml index 7b6737252..b21963bed 100644 --- a/test/layoutengine/standard-testcases/block_space-before_space-after_6.xml +++ b/test/layoutengine/standard-testcases/block_space-before_space-after_6.xml @@ -78,12 +78,6 @@ <penalty w="0" p="0"/> - <glue w="-10000"/> - - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="10000"/> - <box w="14400"/> <skip>3</skip> diff --git a/test/layoutengine/standard-testcases/list-block_space-before_space-after_1.xml b/test/layoutengine/standard-testcases/list-block_space-before_space-after_1.xml index 82af9d20d..2219cdfa1 100644 --- a/test/layoutengine/standard-testcases/list-block_space-before_space-after_1.xml +++ b/test/layoutengine/standard-testcases/list-block_space-before_space-after_1.xml @@ -108,48 +108,24 @@ Two blocks, testing conditionality="discard". <box w="28800"/> - <penalty w="0" p="INF"/> - <glue w="10000"/> <penalty w="0" p="0"/> - <glue w="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000"/> <box w="14400"/> - <penalty w="0" p="INF"/> - <glue w="10000"/> <penalty w="0" p="0"/> - <glue w="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000"/> <box w="14400"/> <!-- skip three more lines --> - <skip>8</skip> - <skip>8</skip> - <skip>8</skip> + <skip>2</skip> + <skip>2</skip> + <skip>2</skip> - <penalty w="0" p="INF"/> - <glue w="10000"/> <penalty w="0" p="0"/> - <glue w="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000"/> <box w="28800"/> <!-- end of first list item --> - <penalty w="0" p="INF"/> - <glue w="10000"/> <penalty w="0" p="0"/> - <glue w="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000"/> <box w="14400"/> <!-- second list-item --> @@ -203,8 +179,8 @@ Two blocks, testing conditionality="discard". <!-- 1: retain --> <eval expected="20000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> - <eval expected="10000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-after"/> - <eval expected="20000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> + <true xpath="not(boolean(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-after))"/> + <true xpath="not(boolean(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/> <!-- the following space is eliminated/collapsed through space resolution --> <true xpath="not(boolean(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-after))"/> <eval expected="10000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/@space-before"/> diff --git a/test/layoutengine/standard-testcases/table_space-before_space-after_1.xml b/test/layoutengine/standard-testcases/table_space-before_space-after_1.xml index 430d8689a..c151d293f 100644 --- a/test/layoutengine/standard-testcases/table_space-before_space-after_1.xml +++ b/test/layoutengine/standard-testcases/table_space-before_space-after_1.xml @@ -96,40 +96,22 @@ Two blocks, testing conditionality="discard". <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="10000"/> <penalty w="14400"/> <!-- p is not of interest here --> - <glue w="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000"/> <box w="28800"/> - <penalty w="0" p="INF"/> - <glue w="10000"/> <penalty w="0" p="0"/> - <glue w="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000"/> <box w="14400"/> <!-- skip three more lines --> - <skip>8</skip> - <skip>8</skip> - <skip>8</skip> - <skip>8</skip> - <skip>8</skip> + <skip>2</skip> + <skip>2</skip> + <skip>2</skip> + <skip>2</skip> + <skip>2</skip> - <penalty w="0" p="INF"/> - <glue w="10000"/> <penalty w="0" p="0"/> - <glue w="-30000"/> - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="20000"/> <box w="28800"/> <!-- end of table --> @@ -185,8 +167,8 @@ Two blocks, testing conditionality="discard". <!-- 1: retain --> <eval expected="20000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> - <eval expected="10000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-after"/> - <eval expected="20000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> + <true xpath="not(boolean(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-after))"/> + <true xpath="not(boolean(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/> <!-- the following space is eliminated/collapsed through space resolution --> <true xpath="not(boolean(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-after))"/> <eval expected="10000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[2]/@space-before"/> diff --git a/test/layoutengine/standard-testcases/table_space-before_space-after_2.xml b/test/layoutengine/standard-testcases/table_space-before_space-after_2.xml index 2e136a5cd..5b889b538 100644 --- a/test/layoutengine/standard-testcases/table_space-before_space-after_2.xml +++ b/test/layoutengine/standard-testcases/table_space-before_space-after_2.xml @@ -18,13 +18,13 @@ <testcase> <info> <p> - This test checks space properties on table. Demonstrates that spaces are repeated on every generated area. + This test checks space properties on table. Demonstrates that spaces are only on the first (or last) generated area. </p> </info> <fo> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> <fo:layout-master-set> - <fo:simple-page-master master-name="normal" page-width="5in" page-height="30pt"> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="28pt"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> @@ -57,42 +57,23 @@ <box w="0"/> <penalty w="0" p="INF"/> <glue w="5000"/> + <box w="10000"/> <penalty w="0" p="0"/> - <glue w="-5000"/> - - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="5000"/> <box w="10000"/> <penalty w="0" p="0"/> - <glue w="-5000"/> - - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="5000"/> <box w="10000"/> <penalty w="0" p="0"/> - <glue w="-5000"/> - - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="5000"/> <box w="10000"/> <penalty w="0" p="0"/> - <glue w="-5000"/> - - <box w="0"/> - <penalty w="0" p="INF"/> - <glue w="5000"/> <box w="10000"/> <skip>3</skip> </element-list> <eval expected="3" xpath="count(//pageViewport)"/> <eval expected="5000" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> - <eval expected="5000" xpath="//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> - <eval expected="5000" xpath="//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before"/> + <true xpath="not(boolean(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/> + <true xpath="not(boolean(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/@space-before))"/> <eval expected="1" xpath="count(//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block)"/> <eval expected="1" xpath="count(//pageViewport[@nr=2]/page/regionViewport/regionBody/mainReference/span/flow/block)"/> <eval expected="1" xpath="count(//pageViewport[@nr=3]/page/regionViewport/regionBody/mainReference/span/flow/block)"/> |