aboutsummaryrefslogtreecommitdiffstats
path: root/test/layoutengine
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2008-03-18 15:01:43 +0000
committerVincent Hennebert <vhennebert@apache.org>2008-03-18 15:01:43 +0000
commitbc8128695c25fdeb81f4e15aacc7247200a420d2 (patch)
treef31ced186a0e447b52dadbd6cef177bd095472f7 /test/layoutengine
parentb0644700fd13beb3286888fbea4dd4a0461d6d54 (diff)
downloadxmlgraphics-fop-bc8128695c25fdeb81f4e15aacc7247200a420d2.tar.gz
xmlgraphics-fop-bc8128695c25fdeb81f4e15aacc7247200a420d2.zip
Merged revisions 636400-636405,636407-638388 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95 ........ r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines Updated copyright years ........ r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. Changes made by Jeremias ........ r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines Bugzilla #44412: Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before. ........ r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines Removed old image adapters. Removed support for Java 1.3 building as it didn't work anymore anyway. Added a check to require Java 1.4 for building. ........ r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines Partially reverted revision 637791: Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise. Updated the licensing info and release notes to make the changes clear. ........ r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning. ........ r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines Changed the documentation to reflect the move to Java 1.4 as a minimum requirement ........ r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines Simplified the getNextKnuthElements method a little bit ........ r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now ........ r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines Updated the probable date of the release ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@638396 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/layoutengine')
-rw-r--r--test/layoutengine/standard-testcases/block-level_break-after_bug44412.xml112
-rw-r--r--test/layoutengine/standard-testcases/block_break-before_bug44412.xml64
-rw-r--r--test/layoutengine/standard-testcases/table_bug44621.xml105
-rw-r--r--test/layoutengine/standard-testcases/table_row-delay_fixed-row-height.xml2
4 files changed, 282 insertions, 1 deletions
diff --git a/test/layoutengine/standard-testcases/block-level_break-after_bug44412.xml b/test/layoutengine/standard-testcases/block-level_break-after_bug44412.xml
new file mode 100644
index 000000000..523d22c6f
--- /dev/null
+++ b/test/layoutengine/standard-testcases/block-level_break-after_bug44412.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks Bugzilla #44412 where the border-after of an fo:block wasn't painted in
+ case break-after is present.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page" page-height="5in" page-width="5in" margin="20pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Before the block</fo:block>
+ <fo:block id="b1" border="4pt solid black" break-before="column" break-after="column">A block with
+ borders and break-before and break-after.</fo:block>
+ <fo:block>After the block</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block-container id="bc1" border="4pt solid black" break-after="column">
+ <fo:block>A block-container with borders and break-after.</fo:block>
+ </fo:block-container>
+ <fo:block>After the block-container</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:list-block id="lb1" border="4pt solid black" break-after="column">
+ <fo:list-item>
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>&#x2022;</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body>
+ <fo:block start-indent="body-start()">Blaaaaaah</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block>After the list-block</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:list-block>
+ <fo:list-item id="li1" border="4pt solid black" break-after="column">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>&#x2022;</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body>
+ <fo:block start-indent="body-start()">Blaaaaaah</fo:block>
+ </fo:list-item-body>
+ </fo:list-item>
+ </fo:list-block>
+ <fo:block>After the list-item</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:table table-layout="fixed" width="100%" id="tbl1" border="4pt solid black" break-after="column">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>Blaaaaah</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>After the table</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="1" xpath="count(//block[@prod-id = 'b1'])"/>
+ <eval expected="4000 4000 4000 4000" xpath="//block[@prod-id = 'b1']/@bap"/>
+
+ <eval expected="2" xpath="count(//block[@prod-id = 'bc1'])"/> <!-- 2 because viewport/ref pair -->
+ <eval expected="4000 4000 4000 4000" xpath="//block[@prod-id = 'bc1'][1]/@bap"/>
+
+ <eval expected="1" xpath="count(//block[@prod-id = 'lb1'])"/>
+ <eval expected="4000 4000 4000 4000" xpath="//block[@prod-id = 'lb1']/@bap"/>
+
+ <eval expected="1" xpath="count(//block[@prod-id = 'li1'])"/>
+ <eval expected="4000 4000 4000 4000" xpath="//block[@prod-id = 'li1']/@bap"/>
+
+ <eval expected="1" xpath="count(//block[@prod-id = 'tbl1'])"/>
+ <eval expected="4000 4000 4000 4000" xpath="//block[@prod-id = 'tbl1']/block[1]/@bap"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/block_break-before_bug44412.xml b/test/layoutengine/standard-testcases/block_break-before_bug44412.xml
new file mode 100644
index 000000000..9ef4150b5
--- /dev/null
+++ b/test/layoutengine/standard-testcases/block_break-before_bug44412.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks Bugzilla #44412 where a break-before on the first child of an otherwise
+ empty block is set. It is expected that the parent block creates two areas, the first with
+ only border-before on the first page and zero bpd.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page" page-height="5in" page-width="5in" margin="20pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="page">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>Before the block</fo:block>
+ <fo:block id="b1" border="4pt solid black">
+ <fo:block break-before="page">The break-before set on this block causes the parent
+ block to produce an empty block area with only a border before on the
+ first page.</fo:block>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="2" xpath="count(//block[@prod-id = 'b1'])"/>
+ <eval expected="4000 4000 4000 0" xpath="(//block[@prod-id = 'b1'])[1]/@bap"/>
+ <eval expected="4000 4000 0 4000" xpath="(//block[@prod-id = 'b1'])[2]/@bap"/>
+ <eval expected="0" xpath="(//block[@prod-id = 'b1'])[1]/@bpd"/>
+ <eval expected="43200" xpath="(//block[@prod-id = 'b1'])[2]/@bpd"/>
+
+ <element-list category="breaker" index="0">
+ <box w="14400"/>
+ <penalty w="0" p="0"/>
+ <box w="0" aux="true"/>
+ <penalty w="0" p="INF"/>
+ <glue w="4000"/> <!-- border-before -->
+ <box w="0"/> <!-- first block area of the "b1" block with zero bpd -->
+
+ <skip>3</skip>
+ </element-list>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/table_bug44621.xml b/test/layoutengine/standard-testcases/table_bug44621.xml
new file mode 100644
index 000000000..b4b9edbd0
--- /dev/null
+++ b/test/layoutengine/standard-testcases/table_bug44621.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This is a testcase for bug #44621: when the width of the after border of a cell, in the
+ trailing case, is bigger than in the normal case, a wrong sequence of Knuth elements was
+ generated, leading to some content being swallowed.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page" page-height="4in" page-width="5in" margin="0.5in">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="page" font-size="12pt">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block space-after="10pt">The after borders of the body’s cells, in the trailing case,
+ are thicker than in the normal case.</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ font-size="8pt" line-height="10pt">
+ <fo:table-column column-width="proportional-column-width(1)"
+ number-columns-repeated="2"/>
+ <fo:table-footer>
+ <fo:table-cell border="4pt solid blue">
+ <fo:block>Footer 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="4pt solid blue">
+ <fo:block>Footer 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell border="2pt solid black">
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="2pt solid black">
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell border="2pt solid black">
+ <fo:block>Cell 2.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="2pt solid black">
+ <fo:block>Cell 2.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+
+ <eval expected="39000" xpath="//pageViewport//flow/block[2]/@bpd"/>
+ <eval expected="39000" xpath="//pageViewport//flow/block[2]/@bpda"/>
+ <!-- cell 1.1 -->
+ <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport//flow/block[2]/block[1]/@bpda"/>
+ <!-- cell 1.2 -->
+ <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="14000" xpath="//pageViewport//flow/block[2]/block[2]/@bpda"/>
+ <!-- cell 2.1 -->
+ <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="16000" xpath="//pageViewport//flow/block[2]/block[3]/@bpda"/>
+ <!-- cell 2.2 -->
+ <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[4]/@bpd"/>
+ <eval expected="16000" xpath="//pageViewport//flow/block[2]/block[4]/@bpda"/>
+ <!-- footer 1.1 -->
+ <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[5]/@bpd"/>
+ <eval expected="18000" xpath="//pageViewport//flow/block[2]/block[5]/@bpda"/>
+ <!-- footer 1.2 -->
+ <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[6]/@bpd"/>
+ <eval expected="18000" xpath="//pageViewport//flow/block[2]/block[6]/@bpda"/>
+
+ <element-list category="breaker">
+ <skip>4</skip>
+ <box w="12000"/>
+ <penalty w="14000" p="0"/><!-- should be 15000 -->
+ <box w="13000"/>
+ <box w="14000"/>
+ <skip>3</skip>
+ </element-list>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/table_row-delay_fixed-row-height.xml b/test/layoutengine/standard-testcases/table_row-delay_fixed-row-height.xml
index 7b50996cc..0c6ed10eb 100644
--- a/test/layoutengine/standard-testcases/table_row-delay_fixed-row-height.xml
+++ b/test/layoutengine/standard-testcases/table_row-delay_fixed-row-height.xml
@@ -145,7 +145,7 @@
<element-list category="breaker">
<skip>3</skip>
<box w="17000"/>
- <penalty w="18000" p="0"/>
+ <penalty w="15000" p="0"/>
<box w="16800"/>
<penalty w="1800" p="0"/>
<box w="31200"/>