aboutsummaryrefslogtreecommitdiffstats
path: root/test/layoutengine
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2008-01-23 15:22:05 +0000
committerVincent Hennebert <vhennebert@apache.org>2008-01-23 15:22:05 +0000
commit58868131c9b55c3bf8f91cad92304e118ab1de41 (patch)
tree07ec135eb57c3119b2517370ef14da1e958fc0eb /test/layoutengine
parent67c26ead2f80ffd25cd27a84023c2e922f173ce7 (diff)
downloadxmlgraphics-fop-58868131c9b55c3bf8f91cad92304e118ab1de41.tar.gz
xmlgraphics-fop-58868131c9b55c3bf8f91cad92304e118ab1de41.zip
Added support for conditional borders (and paddings) in tables.
The proper borders are not selected yet between the header/footer and the body. There might still be a few glitches in some cases git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@614566 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/layoutengine')
-rw-r--r--test/layoutengine/standard-testcases/table-cell_block_break-after.xml12
-rw-r--r--test/layoutengine/standard-testcases/table-cell_span-combinations.xml7
-rw-r--r--test/layoutengine/standard-testcases/table-row_break-before_break-after_2.xml30
-rw-r--r--test/layoutengine/standard-testcases/table_border-collapse_collapse_conditionals.xml177
-rw-r--r--test/layoutengine/standard-testcases/table_border-collapse_collapse_spans_1.xml8
-rw-r--r--test/layoutengine/standard-testcases/table_border-collapse_separate_border-spacing_2.xml36
-rw-r--r--test/layoutengine/standard-testcases/table_border-collapse_separate_conditionals.xml386
-rw-r--r--test/layoutengine/standard-testcases/table_break-before_break-after.xml33
-rw-r--r--test/layoutengine/standard-testcases/table_bug36403.xml19
-rw-r--r--test/layoutengine/standard-testcases/table_empty-cells.xml10
10 files changed, 665 insertions, 53 deletions
diff --git a/test/layoutengine/standard-testcases/table-cell_block_break-after.xml b/test/layoutengine/standard-testcases/table-cell_block_break-after.xml
index 14c5f3b89..8b595ce3c 100644
--- a/test/layoutengine/standard-testcases/table-cell_block_break-after.xml
+++ b/test/layoutengine/standard-testcases/table-cell_block_break-after.xml
@@ -66,14 +66,14 @@
<eval expected="3" xpath="count(//pageViewport[@nr=1]//flow/block[1]/block[1]/block)"/>
<eval expected="67000" xpath="//pageViewport[@nr=1]//flow/block[1]/block[1]/@ipd"/>
<eval expected="75000" xpath="//pageViewport[@nr=1]//flow/block[1]/block[1]/@ipda"/>
- <eval expected="71200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[1]/@bpd"/>
- <eval expected="79200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="69200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="73200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[1]/@bpda"/>
<!-- 2 blocks in the second cell -->
<eval expected="2" xpath="count(//pageViewport[@nr=1]//flow/block[1]/block[2]/block)"/>
<eval expected="63000" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/@ipd"/>
<eval expected="75000" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/@ipda"/>
<eval expected="67200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/@bpd"/>
- <eval expected="79200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="73200" xpath="//pageViewport[@nr=1]//flow/block[1]/block[2]/@bpda"/>
<!-- 3 lines in the second block of the second cell -->
<eval expected="3" xpath="count(//pageViewport[@nr=1]//flow/block[1]/block[2]/block[2]//lineArea)"/>
@@ -82,8 +82,8 @@
<eval expected="0" xpath="count(//pageViewport[@nr=2]//flow/block[1]/block[1]/block)"/>
<eval expected="67000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@ipd"/>
<eval expected="75000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@ipda"/>
- <eval expected="20800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@bpd"/>
- <eval expected="28800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="18800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="22800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@bpda"/>
<!-- One block expected in the second cell -->
<eval expected="1" xpath="count(//pageViewport[@nr=2]//flow/block[1]/block[2]/block)"/>
<!-- One line in the block -->
@@ -91,6 +91,6 @@
<eval expected="63000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@ipd"/>
<eval expected="75000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@ipda"/>
<eval expected="16800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@bpd"/>
- <eval expected="28800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="22800" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@bpda"/>
</checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/table-cell_span-combinations.xml b/test/layoutengine/standard-testcases/table-cell_span-combinations.xml
index fc2357e9f..22ccc303d 100644
--- a/test/layoutengine/standard-testcases/table-cell_span-combinations.xml
+++ b/test/layoutengine/standard-testcases/table-cell_span-combinations.xml
@@ -53,6 +53,9 @@
<fo:table-cell id="cell4" number-columns-spanned="2" number-rows-spanned="2" border="solid 0.5pt" background-color="lightgray">
<fo:block>cell4</fo:block>
</fo:table-cell>
+ <fo:table-cell>
+ <fo:block> </fo:block>
+ </fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell id="cell5" border="solid 0.5pt">
@@ -78,7 +81,7 @@
<eval expected="1" xpath="count(//block[@prod-id = 'cell4'])"/>
<eval expected="1" xpath="count(//block[@prod-id = 'cell5'])"/>
<eval expected="1" xpath="count(//block[@prod-id = 'cell6'])"/>
- <eval expected="45200" xpath="//block[@prod-id = 'cell2']/@bpd"/>
- <eval expected="29800" xpath="//block[@prod-id = 'cell4']/@bpd"/>
+ <eval expected="44200" xpath="//block[@prod-id = 'cell2']/@bpd"/>
+ <eval expected="28800" xpath="//block[@prod-id = 'cell4']/@bpd"/>
</checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/table-row_break-before_break-after_2.xml b/test/layoutengine/standard-testcases/table-row_break-before_break-after_2.xml
index 93b495d56..b7f2b7c6f 100644
--- a/test/layoutengine/standard-testcases/table-row_break-before_break-after_2.xml
+++ b/test/layoutengine/standard-testcases/table-row_break-before_break-after_2.xml
@@ -32,16 +32,15 @@
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>before the table</fo:block>
- <fo:table table-layout="fixed" width="100%">
- <fo:table-column/>
- <fo:table-column/>
+ <fo:table table-layout="fixed" width="100%" border-collapse="separate" border="4pt solid black">
+ <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/>
<fo:table-body>
<fo:table-row break-before="odd-page" break-after="odd-page">
- <fo:table-cell background-color="orange">
- <fo:block>cell3</fo:block>
+ <fo:table-cell border="2pt solid blue" background-color="orange">
+ <fo:block>cell1</fo:block>
</fo:table-cell>
- <fo:table-cell>
- <fo:block>cell4</fo:block>
+ <fo:table-cell border="2pt solid red">
+ <fo:block>cell2</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
@@ -53,5 +52,22 @@
</fo>
<checks>
<eval expected="5" xpath="count(//pageViewport)"/>
+ <!-- table -->
+ <eval expected="18400" xpath="//pageViewport[@nr=3]//flow/block[1]/@bpd"/>
+ <!--
+ <eval expected="26400" xpath="//pageViewport[@nr=3]//flow/block[1]/@bpda"/>
+ <eval expected="(solid,#000000,4000)" xpath="//pageViewport[@nr=3]//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,4000)" xpath="//pageViewport[@nr=3]//flow/block[1]/@border-after"/>
+ -->
+ <!-- cell 1 -->
+ <eval expected="14400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="18400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 2 -->
+ <eval expected="14400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="18400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@border-after"/>
</checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/table_border-collapse_collapse_conditionals.xml b/test/layoutengine/standard-testcases/table_border-collapse_collapse_conditionals.xml
new file mode 100644
index 000000000..a653be423
--- /dev/null
+++ b/test/layoutengine/standard-testcases/table_border-collapse_collapse_conditionals.xml
@@ -0,0 +1,177 @@
+<?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 that conditional paddings and borders on table-cells are handled correctly.
+ </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="5cm" page-width="15cm" margin="1cm">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="page" font-family="serif" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+
+ <!-- table 1 -->
+ <fo:block
+ space-after.minimum="30pt"
+ space-after.optimum="40pt"
+ space-after.maximum="50pt"
+ >Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed" border="6pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row border="5pt solid red">
+ <fo:table-cell border="7pt solid blue" padding="2pt">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-rows-spanned="2"
+ border="4pt solid blue" padding="2pt"
+ border-before-width.length="4pt"
+ border-before-width.conditionality="retain"
+ padding-after.length="7pt"
+ padding-after.conditionality="retain">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="5pt solid purple"
+ border-before-width.length="5pt"
+ border-before-width.conditionality="retain">
+ <fo:table-cell border="4pt solid green" padding="2pt">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ <!-- table 2 -->
+ <fo:block break-before="page"
+ space-after.minimum="30pt"
+ space-after.optimum="40pt"
+ space-after.maximum="50pt"
+ >Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed" border="6pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row border="5pt solid red">
+ <fo:table-cell border="7pt solid blue" padding="2pt">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-rows-spanned="3"
+ border="4pt solid blue" padding="2pt"
+ border-before-width.length="4pt"
+ border-before-width.conditionality="retain"
+ padding-after.length="7pt"
+ padding-after.conditionality="retain">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="5pt solid purple"
+ border-before-width.length="5pt"
+ border-before-width.conditionality="retain">
+ <fo:table-cell border="4pt solid green" padding="2pt">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 2.1</fo:block>
+ <fo:block>Cell 2.1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row border="5pt solid purple"
+ border-before-width.length="5pt"
+ border-before-width.conditionality="retain">
+ <fo:table-cell border="4pt solid green" padding="2pt">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 3.1</fo:block>
+ <fo:block>Cell 3.1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+
+ <!-- before break -->
+ <eval expected="31000" xpath="//pageViewport[@nr='1']//flow/block[2]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="38000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="-3500" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@top-offset"/>
+ <eval expected="(solid,#0000ff,7000,collapse-outer)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@padding-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@padding-after"/>
+ <eval expected="(solid,#0000ff,7000,collapse-outer)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="28000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="34000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="-3000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@top-offset"/>
+ <eval expected="(solid,#000000,6000,collapse-outer)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-after"/>
+ <eval expected="19000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@bpd"/>
+ <eval expected="28000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@bpda"/>
+ <eval expected="3000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@top-offset"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@padding-before"/>
+ <eval expected="7000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[3]/@padding-after"/>
+ <!-- after break -->
+ <eval expected="42500" xpath="//pageViewport[@nr='2']//flow/block[1]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="33000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="48000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="-2500" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@top-offset"/>
+ <eval expected="(solid,#800080,5000,collapse-outer)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@padding-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@padding-after"/>
+ <eval expected="(solid,#000000,6000,collapse-outer)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="37000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="48000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="-2500" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@top-offset"/>
+ <eval expected="(solid,#800080,5000,collapse-outer)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#000000,6000,collapse-outer)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-after"/>
+ <eval expected="30000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@bpd"/>
+ <eval expected="37000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@bpda"/>
+ <eval expected="2500" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@top-offset"/>
+ <eval expected="" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@padding-before"/>
+ <eval expected="7000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[3]/@padding-after"/>
+
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/table_border-collapse_collapse_spans_1.xml b/test/layoutengine/standard-testcases/table_border-collapse_collapse_spans_1.xml
index 5bc7aed33..4a9464bf1 100644
--- a/test/layoutengine/standard-testcases/table_border-collapse_collapse_spans_1.xml
+++ b/test/layoutengine/standard-testcases/table_border-collapse_collapse_spans_1.xml
@@ -208,6 +208,7 @@
<eval expected="6000" xpath="//flow/block[2]/block[2]/@left-offset"/>
<eval expected="-8000" xpath="//flow/block[2]/block[2]/@top-offset"/>
<eval expected="(solid,#000000,16000,collapse-outer)" xpath="//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="" xpath="//flow/block[2]/block[2]/@border-after"/>
<eval expected="(solid,#ff0000,12000,collapse-outer)" xpath="//flow/block[2]/block[2]/@border-start"/>
<eval expected="(solid,#800080,10000,collapse-inner)" xpath="//flow/block[2]/block[2]/@border-end"/>
<eval expected="92000" xpath="//flow/block[2]/block[3]/@ipd"/>
@@ -216,6 +217,7 @@
<eval expected="41800" xpath="//flow/block[2]/block[3]/@bpda"/>
<eval expected="6000" xpath="//flow/block[2]/block[3]/@left-offset"/>
<eval expected="21400" xpath="//flow/block[2]/block[3]/@top-offset"/>
+ <eval expected="" xpath="//flow/block[2]/block[3]/@border-before"/>
<eval expected="(solid,#0000ff,10000,collapse-outer)" xpath="//flow/block[2]/block[3]/@border-after"/>
<eval expected="(solid,#ff0000,12000,collapse-outer)" xpath="//flow/block[2]/block[3]/@border-start"/>
<eval expected="(solid,#008080,4000,collapse-inner)" xpath="//flow/block[2]/block[3]/@border-end"/>
@@ -270,6 +272,7 @@
<eval expected="102000" xpath="//flow/block[4]/block[3]/@left-offset"/>
<eval expected="-2000" xpath="//flow/block[4]/block[3]/@top-offset"/>
<eval expected="(solid,#c0c0c0,4000,collapse-outer)" xpath="//flow/block[4]/block[3]/@border-before"/>
+ <eval expected="" xpath="//flow/block[4]/block[3]/@border-after"/>
<eval expected="(solid,#800080,4000,collapse-inner)" xpath="//flow/block[4]/block[3]/@border-start"/>
<eval expected="(solid,#808000,10000,collapse-outer)" xpath="//flow/block[4]/block[3]/@border-end"/>
<eval expected="87000" xpath="//flow/block[4]/block[4]/@ipd"/>
@@ -278,6 +281,7 @@
<eval expected="71600" xpath="//flow/block[4]/block[4]/@bpda"/>
<eval expected="108000" xpath="//flow/block[4]/block[4]/@left-offset"/>
<eval expected="26400" xpath="//flow/block[4]/block[4]/@top-offset"/>
+ <eval expected="" xpath="//flow/block[4]/block[4]/@border-before"/>
<eval expected="(solid,#800080,4000,collapse-outer)" xpath="//flow/block[4]/block[4]/@border-after"/>
<eval expected="(solid,#808000,16000,collapse-inner)" xpath="//flow/block[4]/block[4]/@border-start"/>
<eval expected="(solid,#808000,10000,collapse-outer)" xpath="//flow/block[4]/block[4]/@border-end"/>
@@ -301,6 +305,7 @@
<eval expected="(solid,#000000,2000,collapse-outer)" xpath="//flow/block[6]/block[1]/@border-before"/>
<eval expected="(solid,#0000ff,4000,collapse-inner)" xpath="//flow/block[6]/block[1]/@border-after"/>
<eval expected="(solid,#ff0000,2000,collapse-outer)" xpath="//flow/block[6]/block[1]/@border-start"/>
+ <eval expected="" xpath="//flow/block[6]/block[6]/@border-end"/>
<eval expected="99000" xpath="//flow/block[6]/block[2]/@ipd"/>
<eval expected="101000" xpath="//flow/block[6]/block[2]/@ipda"/>
<eval expected="23400" xpath="//flow/block[6]/block[2]/@bpd"/>
@@ -309,6 +314,7 @@
<eval expected="-1000" xpath="//flow/block[6]/block[2]/@top-offset"/>
<eval expected="(solid,#000000,2000,collapse-outer)" xpath="//flow/block[6]/block[2]/@border-before"/>
<eval expected="(solid,#000000,10000,collapse-inner)" xpath="//flow/block[6]/block[2]/@border-after"/>
+ <eval expected="" xpath="//flow/block[6]/block[2]/@border-start"/>
<eval expected="(solid,#008080,2000,collapse-outer)" xpath="//flow/block[6]/block[2]/@border-end"/>
<eval expected="185000" xpath="//flow/block[6]/block[3]/@ipd"/>
<eval expected="198000" xpath="//flow/block[6]/block[3]/@ipda"/>
@@ -374,6 +380,7 @@
<eval expected="(solid,#c0c0c0,15000,collapse-inner)" xpath="//flow/block[8]/block[3]/@border-before"/>
<eval expected="(solid,#000080,6000,collapse-outer)" xpath="//flow/block[8]/block[3]/@border-after"/>
<eval expected="(solid,#800080,6000,collapse-outer)" xpath="//flow/block[8]/block[3]/@border-start"/>
+ <eval expected="" xpath="//flow/block[8]/block[3]/@border-end"/>
<eval expected="97000" xpath="//flow/block[8]/block[4]/@ipd"/>
<eval expected="103000" xpath="//flow/block[8]/block[4]/@ipda"/>
<eval expected="39400" xpath="//flow/block[8]/block[4]/@bpd"/>
@@ -382,6 +389,7 @@
<eval expected="34800" xpath="//flow/block[8]/block[4]/@top-offset"/>
<eval expected="(solid,#c0c0c0,15000,collapse-inner)" xpath="//flow/block[8]/block[4]/@border-before"/>
<eval expected="(solid,#000080,6000,collapse-outer)" xpath="//flow/block[8]/block[4]/@border-after"/>
+ <eval expected="" xpath="//flow/block[8]/block[4]/@border-start"/>
<eval expected="(solid,#808000,6000,collapse-outer)" xpath="//flow/block[8]/block[4]/@border-end"/>
<eval expected="144000" xpath="//flow/block[8]/block[5]/@ipd"/>
<eval expected="194000" xpath="//flow/block[8]/block[5]/@ipda"/>
diff --git a/test/layoutengine/standard-testcases/table_border-collapse_separate_border-spacing_2.xml b/test/layoutengine/standard-testcases/table_border-collapse_separate_border-spacing_2.xml
index bb4746cdd..52f0de812 100644
--- a/test/layoutengine/standard-testcases/table_border-collapse_separate_border-spacing_2.xml
+++ b/test/layoutengine/standard-testcases/table_border-collapse_separate_border-spacing_2.xml
@@ -134,17 +134,19 @@
<box w="0"/>
<penalty w="0" p="INF"/>
<glue w="7500"/>
- <box w="15000"/>
- <penalty w="0"/>
- <box w="5000"/>
- <penalty w="5000"/>
- <box w="0"/>
- <penalty w="10000"/>
- <box w="15000"/>
+ <box w="2500"/>
+ <penalty w="10000" p="900"/>
+ <box w="12500"/>
<penalty w="0"/>
+ <box w="7500"/>
+ <penalty w="0" p="900"/>
<box w="0"/>
<penalty w="5000"/>
- <box w="15000"/>
+ <box w="12500"/>
+ <penalty w="0"/>
+ <box w="2500"/>
+ <penalty w="0" p="900"/>
+ <box w="12500"/>
<penalty w="0" p="INF"/>
<glue w="7500"/>
@@ -154,17 +156,19 @@
<box w="0"/>
<penalty w="0" p="INF"/>
<glue w="7500"/>
- <box w="15000"/>
- <penalty w="0"/>
- <box w="5000"/>
- <penalty w="5000"/>
- <box w="0"/>
- <penalty w="10000"/>
- <box w="15000"/>
+ <box w="2500"/>
+ <penalty w="10000" p="900"/>
+ <box w="12500"/>
<penalty w="0"/>
+ <box w="7500"/>
+ <penalty w="0" p="900"/>
<box w="0"/>
<penalty w="5000"/>
- <box w="15000"/>
+ <box w="12500"/>
+ <penalty w="0"/>
+ <box w="2500"/>
+ <penalty w="0" p="900"/>
+ <box w="12500"/>
<box w="0"/> <!-- with SpaceHandlingPosition -->
<penalty w="0" p="INF"/>
<glue w="7500"/>
diff --git a/test/layoutengine/standard-testcases/table_border-collapse_separate_conditionals.xml b/test/layoutengine/standard-testcases/table_border-collapse_separate_conditionals.xml
new file mode 100644
index 000000000..227d5563f
--- /dev/null
+++ b/test/layoutengine/standard-testcases/table_border-collapse_separate_conditionals.xml
@@ -0,0 +1,386 @@
+<?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 that conditional paddings and borders on table-cells are handled correctly.
+ </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="5cm" page-width="15cm" margin="1cm">
+ <fo:region-body background-color="#F0F0F0"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="page" font-family="serif" font-size="8pt" line-height="10pt">
+ <fo:flow flow-name="xsl-region-body">
+
+ <!-- Table 1 -->
+ <fo:block
+ space-after.minimum="30pt"
+ space-after.optimum="40pt"
+ space-after.maximum="50pt"
+ >Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="4pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell border="4pt solid blue" padding="2pt"
+ padding-after.length="3pt"
+ padding-after.conditionality="retain"
+ padding-before.length="2pt"
+ padding-before.conditionality="retain">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="4pt solid blue" padding="2pt"
+ border-before-width.length="6pt"
+ border-before-width.conditionality="retain"
+ border-after-width.length="2pt"
+ border-after-width.conditionality="retain">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ <!-- Table 2 -->
+ <fo:block break-before="page"
+ space-after.minimum="20pt"
+ space-after.optimum="30pt"
+ space-after.maximum="40pt"
+ >Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="4pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell border="4pt solid blue" padding="2pt"
+ border-before-width.length="8pt"
+ border-before-width.conditionality="retain"
+ padding-after.length="5pt"
+ padding-after.conditionality="retain">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="4pt solid blue" padding="2pt"
+ border-after-width.length="6pt"
+ border-after-width.conditionality="retain"
+ padding-before.length="7pt"
+ padding-before.conditionality="retain">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ <!-- Table 3 -->
+ <fo:block break-before="page"
+ space-after.minimum="20pt"
+ space-after.optimum="30pt"
+ space-after.maximum="40pt"
+ >Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="4pt solid black" border-separation="6pt">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell border="4pt solid blue" padding="2pt"
+ border-before-width.length="7pt"
+ border-before-width.conditionality="retain"
+ border-after-width.length="3pt"
+ border-after-width.conditionality="retain"
+ padding-before.length="5pt"
+ padding-before.conditionality="retain"
+ padding-after.length="1pt"
+ padding-after.conditionality="retain">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="4pt solid blue" padding="2pt">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ <!-- Table 4 -->
+ <fo:block break-before="page"
+ space-after.minimum="20pt"
+ space-after.optimum="30pt"
+ space-after.maximum="40pt"
+ >Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="4pt solid black" border-separation="5pt">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell border="4pt solid blue" padding="2pt"
+ border-after-width.length="1pt"
+ border-after-width.conditionality="retain"
+ padding-after.length="9pt"
+ padding-after.conditionality="retain">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="4pt solid blue" padding="2pt"
+ border-before-width.length="10pt"
+ border-before-width.conditionality="retain"
+ padding-before.length="11pt"
+ padding-before.conditionality="retain">
+ <fo:block background-color="yellow">
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ <fo:block>Cell 1.2</fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ <!-- Table 5 -->
+ <!-- The cell on the second column finished early. Still, the conditional border-after
+ must be taken into account -->
+ <fo:block break-before="page"
+ space-after.minimum="40pt"
+ space-after.optimum="50pt"
+ space-after.maximum="60pt"
+ >Before the table</fo:block>
+ <fo:table width="100%" table-layout="fixed"
+ border-collapse="separate" border="4pt solid black">
+ <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell border="2pt solid blue">
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ <fo:block>Cell 1.1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell border="2pt solid red">
+ <fo:block>Cell 1.2</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+
+ <!-- table 1 -->
+ <!-- before break -->
+ <eval expected="30000" xpath="//pageViewport[@nr='1']//flow/block[2]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="21000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="30000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,4000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@padding-before"/>
+ <eval expected="3000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@padding-after"/>
+ <eval expected="" xpath="//pageViewport[@nr='1']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="30000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,6000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@padding-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@padding-after"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='1']//flow/block[2]/block[2]/@border-after"/>
+ <!-- after break -->
+ <eval expected="30000" xpath="//pageViewport[@nr='2']//flow/block[1]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="21000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="30000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@padding-before"/>
+ <eval expected="3000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@padding-after"/>
+ <eval expected="(solid,#0000ff,4000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="30000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,6000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@padding-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@padding-after"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='2']//flow/block[1]/block[2]/@border-after"/>
+
+ <!-- table 2 -->
+ <!-- before break -->
+ <eval expected="45000" xpath="//pageViewport[@nr='3']//flow/block[2]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="30000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="45000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,8000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@padding-before"/>
+ <eval expected="5000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@padding-after"/>
+ <eval expected="" xpath="//pageViewport[@nr='3']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="28000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="45000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,4000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="7000" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@padding-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@padding-after"/>
+ <eval expected="(solid,#0000ff,6000)" xpath="//pageViewport[@nr='3']//flow/block[2]/block[2]/@border-after"/>
+ <!-- after break -->
+ <eval expected="35000" xpath="//pageViewport[@nr='4']//flow/block[1]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="18000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="35000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,8000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@padding-before"/>
+ <eval expected="5000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@padding-after"/>
+ <eval expected="(solid,#0000ff,4000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="35000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="7000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@padding-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@padding-after"/>
+ <eval expected="(solid,#0000ff,6000)" xpath="//pageViewport[@nr='4']//flow/block[1]/block[2]/@border-after"/>
+
+ <!-- table 3 -->
+ <!-- before break -->
+ <eval expected="42000" xpath="//pageViewport[@nr='5']//flow/block[2]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="36000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,7000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="5000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@padding-before"/>
+ <eval expected="1000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@padding-after"/>
+ <eval expected="(solid,#0000ff,3000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="33000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="39000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,4000)" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@padding-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@padding-after"/>
+ <eval expected="" xpath="//pageViewport[@nr='5']//flow/block[2]/block[2]/@border-after"/>
+ <!-- after break -->
+ <eval expected="42000" xpath="//pageViewport[@nr='6']//flow/block[1]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="36000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,7000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="5000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@padding-before"/>
+ <eval expected="1000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@padding-after"/>
+ <eval expected="(solid,#0000ff,3000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="33000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="39000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@padding-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@padding-after"/>
+ <eval expected="(solid,#0000ff,4000)" xpath="//pageViewport[@nr='6']//flow/block[1]/block[2]/@border-after"/>
+
+ <!-- table 4 -->
+ <!-- before break -->
+ <eval expected="41000" xpath="//pageViewport[@nr='7']//flow/block[2]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="36000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,4000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@padding-before"/>
+ <eval expected="9000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@padding-after"/>
+ <eval expected="(solid,#0000ff,1000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="17500" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="38500" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,10000)" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="11000" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@padding-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@padding-after"/>
+ <eval expected="" xpath="//pageViewport[@nr='7']//flow/block[2]/block[2]/@border-after"/>
+ <!-- after break -->
+ <eval expected="62000" xpath="//pageViewport[@nr='8']//flow/block[1]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="49500" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="59500" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@padding-before"/>
+ <eval expected="9000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@padding-after"/>
+ <eval expected="(solid,#0000ff,1000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="30000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="57000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#0000ff,10000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="11000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@padding-before"/>
+ <eval expected="2000" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@padding-after"/>
+ <eval expected="(solid,#0000ff,4000)" xpath="//pageViewport[@nr='8']//flow/block[1]/block[2]/@border-after"/>
+
+ <!-- table 5 -->
+ <!-- before break -->
+ <eval expected="22000" xpath="//pageViewport[@nr='9']//flow/block[2]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@bpd"/>
+ <eval expected="22000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='9']//flow/block[2]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@bpd"/>
+ <eval expected="22000" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@border-before"/>
+ <eval expected="" xpath="//pageViewport[@nr='9']//flow/block[2]/block[2]/@border-after"/>
+ <!-- after break -->
+ <eval expected="22000" xpath="//pageViewport[@nr='10']//flow/block[1]/@bpd"/>
+ <!-- cell 1.1 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="22000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 1.2 -->
+ <eval expected="20000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="22000" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr='10']//flow/block[1]/block[2]/@border-after"/>
+
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/table_break-before_break-after.xml b/test/layoutengine/standard-testcases/table_break-before_break-after.xml
index b85e0ea62..31c1fd8cb 100644
--- a/test/layoutengine/standard-testcases/table_break-before_break-after.xml
+++ b/test/layoutengine/standard-testcases/table_break-before_break-after.xml
@@ -25,23 +25,23 @@
<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="5in">
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="20pt">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="normal" white-space-collapse="true">
<fo:flow flow-name="xsl-region-body">
<fo:block>before the table</fo:block>
- <fo:table table-layout="fixed" width="100%" break-before="odd-page" break-after="odd-page">
- <fo:table-column/>
- <fo:table-column/>
+ <fo:table table-layout="fixed" width="100%" border-collapse="separate" border="4pt solid black"
+ break-before="odd-page" break-after="odd-page">
+ <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/>
<fo:table-body>
<fo:table-row>
- <fo:table-cell background-color="orange">
- <fo:block>cell3</fo:block>
+ <fo:table-cell border="2pt solid blue" background-color="orange">
+ <fo:block>cell1</fo:block>
</fo:table-cell>
- <fo:table-cell>
- <fo:block>cell4</fo:block>
+ <fo:table-cell border="2pt solid red">
+ <fo:block>cell2</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
@@ -53,5 +53,22 @@
</fo>
<checks>
<eval expected="5" xpath="count(//pageViewport)"/>
+ <!-- table -->
+ <eval expected="18400" xpath="//pageViewport[@nr=3]//flow/block[1]/@bpd"/>
+ <!--
+ <eval expected="26400" xpath="//pageViewport[@nr=3]//flow/block[1]/@bpda"/>
+ <eval expected="(solid,#000000,4000)" xpath="//pageViewport[@nr=3]//flow/block[1]/@border-before"/>
+ <eval expected="(solid,#000000,4000)" xpath="//pageViewport[@nr=3]//flow/block[1]/@border-after"/>
+ -->
+ <!-- cell 1 -->
+ <eval expected="14400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@bpd"/>
+ <eval expected="18400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@bpda"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@border-before"/>
+ <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[1]/@border-after"/>
+ <!-- cell 2 -->
+ <eval expected="14400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@bpd"/>
+ <eval expected="18400" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@bpda"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@border-before"/>
+ <eval expected="(solid,#ff0000,2000)" xpath="//pageViewport[@nr=3]//flow/block[1]/block[2]/@border-after"/>
</checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/table_bug36403.xml b/test/layoutengine/standard-testcases/table_bug36403.xml
index 8d8e8950b..ee2116b50 100644
--- a/test/layoutengine/standard-testcases/table_bug36403.xml
+++ b/test/layoutengine/standard-testcases/table_bug36403.xml
@@ -79,21 +79,22 @@
</fo>
<checks>
<element-list category="breaker" id="skipped-step">
- <box w="0"/>
- <penalty w="14400" p="INF"/> <!-- Skipped step has an INFINITE penalty -->
- <box w="50400"/>
+ <box w="14400"/>
+ <penalty w="0" p="INF"/> <!-- Skipped step has an INFINITE penalty -->
+ <glue w="3600"/>
+ <box w="32400"/>
<skip>3</skip>
</element-list>
<element-list category="breaker" id="backtrack">
- <box w="0"/>
- <penalty w="10000"/> <!-- p > 0 && p <= INF -->
- <box w="18400"/>
+ <box w="2000"/>
+ <penalty w="8000" p="900"/> <!-- p > 0 && p <= INF -->
+ <box w="16400"/>
<penalty w="0" p="0"/>
<box w="0"/>
<penalty w="1600"/> <!-- p = ??? --> <!-- I'm not sure here what the penalty values should be for these two. -->
- <box w="0"/>
- <penalty w="11600"/> <!-- p = ??? -->
- <box w="24400"/>
+ <box w="5000"/>
+ <penalty w="6600"/> <!-- p = ??? -->
+ <box w="19400"/>
<skip>3</skip>
</element-list>
</checks>
diff --git a/test/layoutengine/standard-testcases/table_empty-cells.xml b/test/layoutengine/standard-testcases/table_empty-cells.xml
index 9d93aaab0..e9911fb4b 100644
--- a/test/layoutengine/standard-testcases/table_empty-cells.xml
+++ b/test/layoutengine/standard-testcases/table_empty-cells.xml
@@ -87,13 +87,13 @@
<eval expected="2" xpath="count(//pageViewport)"/>
<element-list category="breaker">
<skip>6</skip>
- <box w="0"/>
- <penalty p="900" w="2000"/>
+ <box w="1000"/>
+ <penalty p="900" w="1000"/>
<box w="14400"/>
- <penalty p="0" w="2000"/>
+ <penalty p="0" w="0"/>
<box w="14400"/>
- <penalty p="0" w="2000"/>
- <box w="16400"/>
+ <penalty p="0" w="0"/>
+ <box w="15400"/>
<penalty p="0" w="0"/>
<skip>16</skip>
</element-list>