diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2008-03-05 18:22:06 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2008-03-05 18:22:06 +0000 |
commit | 77c8566a57472e33049c8e02dd753dd79944e2ad (patch) | |
tree | d8b4f12d368f8f247e16772a2053b2e9b1c373b5 /test | |
parent | 3fc5d3af38b065c8298c1f56efbc810f399213c7 (diff) | |
download | xmlgraphics-fop-77c8566a57472e33049c8e02dd753dd79944e2ad.tar.gz xmlgraphics-fop-77c8566a57472e33049c8e02dd753dd79944e2ad.zip |
- Fixed the rendering of the area of a table corresponding to border-separation, which must be filled with the background of the table, and not the rows.
- Improved conformance: even if a table-cell spans several rows its background must correspond to the first row spanned.
- Added support for background on fo:table-column and fo:table-header/footer/body
TODO more testcases needed, especially tables with collapsing border model and tables broken over pages
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@633961 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
8 files changed, 552 insertions, 116 deletions
diff --git a/test/layoutengine/standard-testcases/table-cell_conditional-spaces_2.xml b/test/layoutengine/standard-testcases/table-cell_conditional-spaces_2.xml index 1a9940e38..9a0920cf1 100644 --- a/test/layoutengine/standard-testcases/table-cell_conditional-spaces_2.xml +++ b/test/layoutengine/standard-testcases/table-cell_conditional-spaces_2.xml @@ -168,94 +168,108 @@ <!-- 1. table not broken --> <eval expected="92200" xpath="//pageViewport[1]//flow/block[2]/@bpd"/> + <!-- Cell 1.2 --> <!-- Block for yellow background --> <eval expected="48600" xpath="//pageViewport[1]//flow/block[2]/block[1]/@bpd"/> - <!-- Cell 1.2 --> <eval expected="48600" xpath="//pageViewport[1]//flow/block[2]/block[2]/@bpd"/> <eval expected="15000" xpath="//pageViewport[1]//flow/block[2]/block[2]/block[1]/@space-after"/> <eval expected="0" xpath="count(//pageViewport[1]//flow/block[2]/block[2]/block[2]/@space-before)"/> - <!-- Block for grey background --> - <eval expected="43600" xpath="//pageViewport[1]//flow/block[2]/block[3]/@bpd"/> <!-- Cell 1.1 --> + <!-- Block for yellow background --> + <eval expected="92200" xpath="//pageViewport[1]//flow/block[2]/block[3]/@bpd"/> <eval expected="20000" xpath="//pageViewport[1]//flow/block[2]/block[4]/block[1]/@space-after"/> <eval expected="0" xpath="count(//pageViewport[1]//flow/block[2]/block[4]/block[2]/@space-before)"/> <!-- Cell 2.2 --> + <!-- Block for grey background --> <eval expected="43600" xpath="//pageViewport[1]//flow/block[2]/block[5]/@bpd"/> - <eval expected="0" xpath="count(//pageViewport[1]//flow/block[2]/block[5]/block[1]/@space-after)"/> - <eval expected="10000" xpath="//pageViewport[1]//flow/block[2]/block[5]/block[2]/@space-before"/> + <eval expected="43600" xpath="//pageViewport[1]//flow/block[2]/block[6]/@bpd"/> + <eval expected="0" xpath="count(//pageViewport[1]//flow/block[2]/block[6]/block[1]/@space-after)"/> + <eval expected="10000" xpath="//pageViewport[1]//flow/block[2]/block[6]/block[2]/@space-before"/> <!-- 2. Cells 1.1 and 1.2 split --> <!-- First page --> <eval expected="31800" xpath="//pageViewport[2]//flow/block[2]/@bpd"/> + <!-- Cell 1.1 Line 1 --> <!-- Block for yellow background --> <eval expected="31800" xpath="//pageViewport[2]//flow/block[2]/block[1]/@bpd"/> - <!-- Cell 1.1 Line 1 --> <eval expected="0" xpath="count(//pageViewport[2]//flow/block[2]/block[2]/block[1]/@space-after)"/> <!-- Cell 1.2 Line 1 --> - <eval expected="15000" xpath="//pageViewport[2]//flow/block[2]/block[3]/block[1]/@space-after"/> + <!-- Block for yellow background --> + <eval expected="31800" xpath="//pageViewport[2]//flow/block[2]/block[3]/@bpd"/> + <eval expected="15000" xpath="//pageViewport[2]//flow/block[2]/block[4]/block[1]/@space-after"/> <!-- Second page --> <eval expected="60400" xpath="//pageViewport[3]//flow/block[1]/@bpd"/> + <!-- Cell 1.2 Line 2 --> <!-- Block for yellow background --> <eval expected="16800" xpath="//pageViewport[3]//flow/block[1]/block[1]/@bpd"/> - <!-- Cell 1.2 Line 2 --> <eval expected="16800" xpath="//pageViewport[3]//flow/block[1]/block[2]/@bpd"/> <eval expected="0" xpath="count(//pageViewport[3]//flow/block[1]/block[2]/@space-before)"/> - <!-- Block for grey background --> - <eval expected="43600" xpath="//pageViewport[3]//flow/block[1]/block[3]/@bpd"/> <!-- Cell 1.1 Line 2 --> + <!-- Block for yellow background --> + <eval expected="60400" xpath="//pageViewport[3]//flow/block[1]/block[3]/@bpd"/> <eval expected="16800" xpath="//pageViewport[3]//flow/block[1]/block[4]/block[1]/@bpd"/> <eval expected="10000" xpath="//pageViewport[3]//flow/block[1]/block[4]/block[1]/@space-before"/> <!-- Cell 2.2 --> + <!-- Block for grey background --> <eval expected="43600" xpath="//pageViewport[3]//flow/block[1]/block[5]/@bpd"/> - <eval expected="0" xpath="count(//pageViewport[3]//flow/block[1]/block[5]/block[1]/@space-after)"/> - <eval expected="10000" xpath="//pageViewport[3]//flow/block[1]/block[5]/block[2]/@space-before"/> + <eval expected="43600" xpath="//pageViewport[3]//flow/block[1]/block[6]/@bpd"/> + <eval expected="0" xpath="count(//pageViewport[3]//flow/block[1]/block[6]/block[1]/@space-after)"/> + <eval expected="10000" xpath="//pageViewport[3]//flow/block[1]/block[6]/block[2]/@space-before"/> <!-- 3. Cell 1.1 split, cell 1.2 not --> <!-- First page --> <eval expected="48600" xpath="//pageViewport[4]//flow/block[2]/@bpd"/> + <!-- Cell 1.1 Line 1 --> <!-- Block for yellow background --> <eval expected="48600" xpath="//pageViewport[4]//flow/block[2]/block[1]/@bpd"/> - <!-- Cell 1.1 Line 1 --> <eval expected="0" xpath="count(//pageViewport[4]//flow/block[2]/block[2]/block[1]/@space-after)"/> <!-- Cell 1.2 Line 1 --> - <eval expected="15000" xpath="//pageViewport[4]//flow/block[2]/block[3]/block[1]/@space-after"/> - <eval expected="0" xpath="count(//pageViewport[4]//flow/block[2]/block[3]/block[2]/@space-before)"/> + <!-- Block for yellow background --> + <eval expected="48600" xpath="//pageViewport[4]//flow/block[2]/block[3]/@bpd"/> + <eval expected="15000" xpath="//pageViewport[4]//flow/block[2]/block[4]/block[1]/@space-after"/> + <eval expected="0" xpath="count(//pageViewport[4]//flow/block[2]/block[4]/block[2]/@space-before)"/> <!-- Second page --> <eval expected="43600" xpath="//pageViewport[5]//flow/block[1]/@bpd"/> - <!-- Block for grey background --> - <eval expected="43600" xpath="//pageViewport[5]//flow/block[1]/block[1]/@bpd"/> <!-- Cell 1.1 Line 2 --> + <!-- Block for yellow background --> + <eval expected="43600" xpath="//pageViewport[5]//flow/block[1]/block[1]/@bpd"/> <eval expected="16800" xpath="//pageViewport[5]//flow/block[1]/block[2]/block[1]/@bpd"/> <eval expected="10000" xpath="//pageViewport[5]//flow/block[1]/block[2]/block[1]/@space-before"/> <!-- Cell 2.2 --> + <!-- Block for grey background --> <eval expected="43600" xpath="//pageViewport[5]//flow/block[1]/block[3]/@bpd"/> - <eval expected="0" xpath="count(//pageViewport[5]//flow/block[1]/block[3]/block[1]/@space-after)"/> - <eval expected="10000" xpath="//pageViewport[5]//flow/block[1]/block[3]/block[2]/@space-before"/> + <eval expected="43600" xpath="//pageViewport[5]//flow/block[1]/block[4]/@bpd"/> + <eval expected="0" xpath="count(//pageViewport[5]//flow/block[1]/block[4]/block[1]/@space-after)"/> + <eval expected="10000" xpath="//pageViewport[5]//flow/block[1]/block[4]/block[2]/@space-before"/> <!-- 4. Cell 2.2 split --> <!-- First page --> <eval expected="65400" xpath="//pageViewport[6]//flow/block[2]/@bpd"/> + <!-- Cell 1.2 --> <!-- Block for yellow background --> <eval expected="48600" xpath="//pageViewport[6]//flow/block[2]/block[1]/@bpd"/> - <!-- Cell 1.2 --> <eval expected="48600" xpath="//pageViewport[6]//flow/block[2]/block[2]/@bpd"/> <eval expected="15000" xpath="//pageViewport[6]//flow/block[2]/block[2]/block[1]/@space-after"/> <eval expected="0" xpath="count(//pageViewport[6]//flow/block[2]/block[2]/block[2]/@space-before)"/> - <!-- Block for grey background --> - <eval expected="16800" xpath="//pageViewport[6]//flow/block[2]/block[3]/@bpd"/> <!-- Cell 1.1 --> + <!-- Block for yellow background --> + <eval expected="65400" xpath="//pageViewport[6]//flow/block[2]/block[3]/@bpd"/> <eval expected="20000" xpath="//pageViewport[6]//flow/block[2]/block[4]/block[1]/@space-after"/> <eval expected="0" xpath="count(//pageViewport[6]//flow/block[2]/block[4]/block[2]/@space-before)"/> <!-- Cell 2.2 Line 1 --> + <!-- Block for grey background --> <eval expected="16800" xpath="//pageViewport[6]//flow/block[2]/block[5]/@bpd"/> - <eval expected="0" xpath="count(//pageViewport[6]//flow/block[2]/block[5]/block[1]/@space-after)"/> + <eval expected="16800" xpath="//pageViewport[6]//flow/block[2]/block[6]/@bpd"/> + <eval expected="0" xpath="count(//pageViewport[6]//flow/block[2]/block[6]/block[1]/@space-after)"/> <!-- Second page --> <eval expected="26800" xpath="//pageViewport[7]//flow/block[1]/@bpd"/> - <!-- Block for grey background --> + <!-- Block for yellow background --> <eval expected="26800" xpath="//pageViewport[7]//flow/block[1]/block[1]/@bpd"/> <!-- Cell 2.2 Line 2 --> + <!-- Block for grey background --> <eval expected="26800" xpath="//pageViewport[7]//flow/block[1]/block[3]/@bpd"/> - <eval expected="10000" xpath="//pageViewport[7]//flow/block[1]/block[3]/block[1]/@space-before"/> + <eval expected="26800" xpath="//pageViewport[7]//flow/block[1]/block[4]/@bpd"/> + <eval expected="10000" xpath="//pageViewport[7]//flow/block[1]/block[4]/block[1]/@space-before"/> </checks> </testcase> diff --git a/test/layoutengine/standard-testcases/table-footer_omit-footer-at-break.xml b/test/layoutengine/standard-testcases/table-footer_omit-footer-at-break.xml index 7b2cc6904..59c60f72e 100644 --- a/test/layoutengine/standard-testcases/table-footer_omit-footer-at-break.xml +++ b/test/layoutengine/standard-testcases/table-footer_omit-footer-at-break.xml @@ -97,35 +97,35 @@ <eval expected="header" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/block[1]/lineArea"/> <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@ipda"/> <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@bpda"/--> - <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/block[1]/lineArea, '1')"/> - <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@ipda"/> - <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@bpda"/--> + <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea, '1')"/> + <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/> + <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/--> - <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/> - <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/> - <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/> - <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/> - <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/> - <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/> + <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/> + <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/> + <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/> + <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/> + <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/> + <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/block[1]/lineArea"/> - <true xpath="not(boolean(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]))"/> + <true xpath="not(boolean(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]))"/> <!-- page 2 --> <eval expected="header" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/block[1]/lineArea"/> <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@ipda"/> <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@bpda"/--> - <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/block[1]/lineArea, '2')"/> - <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@ipda"/> - <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@bpda"/--> + <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea, '2')"/> + <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/> + <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/--> - <eval expected="cell7" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/> - <eval expected="cell8" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/> + <eval expected="cell7" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/> + <eval expected="cell8" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/> - <eval expected="footer" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/> - <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/@ipda"/> - <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/@bpda"/--> - <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea, '2')"/> + <eval expected="footer" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/> <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/@ipda"/> <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/@bpda"/--> + <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/block[1]/lineArea, '2')"/> + <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/@ipda"/> + <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/@bpda"/--> </checks> </testcase> diff --git a/test/layoutengine/standard-testcases/table-header_omit-header-at-break.xml b/test/layoutengine/standard-testcases/table-header_omit-header-at-break.xml index 6834deeac..5ec211645 100644 --- a/test/layoutengine/standard-testcases/table-header_omit-header-at-break.xml +++ b/test/layoutengine/standard-testcases/table-header_omit-header-at-break.xml @@ -32,7 +32,7 @@ <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:table table-layout="fixed" width="100%" table-omit-header-at-break="true"> - <fo:table-column number-columns-repeated="2"/> + <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/> <fo:table-header> <fo:table-row background-color="yellow"> <fo:table-cell> @@ -97,23 +97,23 @@ <eval expected="header" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/block[1]/lineArea"/> <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@ipda"/> <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@bpda"/--> - <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/block[1]/lineArea, '1')"/> - <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@ipda"/> - <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@bpda"/--> + <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea, '1')"/> + <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/> + <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/--> - <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/> - <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/> - <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/> - <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/> - <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/> - <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/> + <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/> + <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/> + <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/> + <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/> + <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/> + <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/block[1]/lineArea"/> - <eval expected="footer" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/block[1]/lineArea"/> - <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/@ipda"/> - <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/@bpda"/--> - <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/block[1]/lineArea, '1')"/> + <eval expected="footer" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/block[1]/lineArea"/> <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/@ipda"/> <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/@bpda"/--> + <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/block[1]/lineArea, '1')"/> + <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/@ipda"/> + <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/@bpda"/--> <!-- page 2 --> <eval expected="cell7" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/block[1]/lineArea"/> @@ -122,8 +122,8 @@ <eval expected="footer" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/> <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/> <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/--> - <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea, '2')"/> - <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/@ipda"/> - <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/@bpda"/--> + <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea, '2')"/> + <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/@ipda"/> + <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/@bpda"/--> </checks> </testcase> diff --git a/test/layoutengine/standard-testcases/table-header_table-footer_1.xml b/test/layoutengine/standard-testcases/table-header_table-footer_1.xml index df45e328b..00cbcde54 100644 --- a/test/layoutengine/standard-testcases/table-header_table-footer_1.xml +++ b/test/layoutengine/standard-testcases/table-header_table-footer_1.xml @@ -32,7 +32,7 @@ <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:table table-layout="fixed" width="100%"> - <fo:table-column number-columns-repeated="2"/> + <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/> <fo:table-header> <fo:table-row background-color="yellow"> <fo:table-cell> @@ -82,31 +82,41 @@ <!-- header row background --> <eval expected="color=#ffff00" xpath="//flow/block[1]/block[1]/@background"/> - <eval expected="360000" xpath="//flow/block[1]/block[1]/@ipda"/> + <eval expected="180000" xpath="//flow/block[1]/block[1]/@ipda"/> <eval expected="14400" xpath="//flow/block[1]/block[1]/@bpda"/> + <eval expected="" xpath="//flow/block[1]/block[1]/@left-offset"/> + <eval expected="color=#ffff00" xpath="//flow/block[1]/block[3]/@background"/> + <eval expected="180000" xpath="//flow/block[1]/block[3]/@ipda"/> + <eval expected="14400" xpath="//flow/block[1]/block[3]/@bpda"/> + <eval expected="180000" xpath="//flow/block[1]/block[3]/@left-offset"/> <eval expected="header1" xpath="//flow/block[1]/block[2]/block[1]/lineArea"/> <eval expected="180000" xpath="//flow/block[1]/block[2]/@ipda"/> <eval expected="14400" xpath="//flow/block[1]/block[2]/@bpda"/> - <eval expected="header2" xpath="//flow/block[1]/block[3]/block[1]/lineArea"/> - <eval expected="180000" xpath="//flow/block[1]/block[3]/@ipda"/> - <eval expected="14400" xpath="//flow/block[1]/block[3]/@bpda"/> + <eval expected="header2" xpath="//flow/block[1]/block[4]/block[1]/lineArea"/> + <eval expected="180000" xpath="//flow/block[1]/block[4]/@ipda"/> + <eval expected="14400" xpath="//flow/block[1]/block[4]/@bpda"/> - <eval expected="cell1" xpath="//flow/block[1]/block[4]/block[1]/lineArea"/> - <eval expected="cell2" xpath="//flow/block[1]/block[5]/block[1]/lineArea"/> - <eval expected="cell3" xpath="//flow/block[1]/block[6]/block[1]/lineArea"/> - <eval expected="cell4" xpath="//flow/block[1]/block[7]/block[1]/lineArea"/> + <eval expected="cell1" xpath="//flow/block[1]/block[5]/block[1]/lineArea"/> + <eval expected="cell2" xpath="//flow/block[1]/block[6]/block[1]/lineArea"/> + <eval expected="cell3" xpath="//flow/block[1]/block[7]/block[1]/lineArea"/> + <eval expected="cell4" xpath="//flow/block[1]/block[8]/block[1]/lineArea"/> <!-- footer row background --> - <eval expected="color=#ffa500" xpath="//flow/block[1]/block[8]/@background"/> - <eval expected="360000" xpath="//flow/block[1]/block[8]/@ipda"/> - <eval expected="14400" xpath="//flow/block[1]/block[8]/@bpda"/> - - <eval expected="footer1" xpath="//flow/block[1]/block[9]/block[1]/lineArea"/> + <eval expected="color=#ffa500" xpath="//flow/block[1]/block[9]/@background"/> <eval expected="180000" xpath="//flow/block[1]/block[9]/@ipda"/> <eval expected="14400" xpath="//flow/block[1]/block[9]/@bpda"/> - <eval expected="footer2" xpath="//flow/block[1]/block[10]/block[1]/lineArea"/> + <eval expected="" xpath="//flow/block[1]/block[9]/@left-offset"/> + <eval expected="color=#ffa500" xpath="//flow/block[1]/block[11]/@background"/> + <eval expected="180000" xpath="//flow/block[1]/block[11]/@ipda"/> + <eval expected="14400" xpath="//flow/block[1]/block[11]/@bpda"/> + <eval expected="180000" xpath="//flow/block[1]/block[11]/@left-offset"/> + + <eval expected="footer1" xpath="//flow/block[1]/block[10]/block[1]/lineArea"/> <eval expected="180000" xpath="//flow/block[1]/block[10]/@ipda"/> <eval expected="14400" xpath="//flow/block[1]/block[10]/@bpda"/> + <eval expected="footer2" xpath="//flow/block[1]/block[12]/block[1]/lineArea"/> + <eval expected="180000" xpath="//flow/block[1]/block[12]/@ipda"/> + <eval expected="14400" xpath="//flow/block[1]/block[12]/@bpda"/> </checks> </testcase> diff --git a/test/layoutengine/standard-testcases/table-header_table-footer_2.xml b/test/layoutengine/standard-testcases/table-header_table-footer_2.xml index 9cf3db4c0..7716dfe58 100644 --- a/test/layoutengine/standard-testcases/table-header_table-footer_2.xml +++ b/test/layoutengine/standard-testcases/table-header_table-footer_2.xml @@ -32,7 +32,7 @@ <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:table table-layout="fixed" width="100%"> - <fo:table-column number-columns-repeated="2"/> + <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/> <fo:table-header> <fo:table-row background-color="yellow"> <fo:table-cell> @@ -97,40 +97,40 @@ <eval expected="header" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/block[1]/lineArea"/> <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@ipda"/> <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@bpda"/--> - <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/block[1]/lineArea, '1')"/> - <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@ipda"/> - <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@bpda"/--> + <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea, '1')"/> + <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/> + <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/--> - <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/> - <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/> - <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/> - <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/> - <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/> - <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/> + <eval expected="cell1" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/> + <eval expected="cell2" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/> + <eval expected="cell3" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/> + <eval expected="cell4" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/> + <eval expected="cell5" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[9]/block[1]/lineArea"/> + <eval expected="cell6" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/block[1]/lineArea"/> - <eval expected="footer" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/block[1]/lineArea"/> - <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/@ipda"/> - <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[11]/@bpda"/--> - <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/block[1]/lineArea, '1')"/> + <eval expected="footer" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/block[1]/lineArea"/> <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/@ipda"/> <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[12]/@bpda"/--> + <true xpath="contains(//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/block[1]/lineArea, '1')"/> + <eval expected="180000" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/@ipda"/> + <!--eval expected="14400" xpath="//pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[14]/@bpda"/--> <!-- page 2 --> <eval expected="header" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/block[1]/lineArea"/> <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@ipda"/> <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[2]/@bpda"/--> - <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/block[1]/lineArea, '2')"/> - <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@ipda"/> - <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[3]/@bpda"/--> + <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea, '2')"/> + <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@ipda"/> + <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/@bpda"/--> - <eval expected="cell7" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[4]/block[1]/lineArea"/> - <eval expected="cell8" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/> + <eval expected="cell7" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[5]/block[1]/lineArea"/> + <eval expected="cell8" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[6]/block[1]/lineArea"/> - <eval expected="footer" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/block[1]/lineArea"/> - <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/@ipda"/> - <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[7]/@bpda"/--> - <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea, '2')"/> + <eval expected="footer" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/block[1]/lineArea"/> <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/@ipda"/> <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[8]/@bpda"/--> + <true xpath="contains(//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/block[1]/lineArea, '2')"/> + <eval expected="180000" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/@ipda"/> + <!--eval expected="14400" xpath="//pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block[1]/block[10]/@bpda"/--> </checks> </testcase> diff --git a/test/layoutengine/standard-testcases/table-row_background-image.xml b/test/layoutengine/standard-testcases/table-row_background-image.xml index fa29f1b8e..f4dc65ae7 100644 --- a/test/layoutengine/standard-testcases/table-row_background-image.xml +++ b/test/layoutengine/standard-testcases/table-row_background-image.xml @@ -34,10 +34,8 @@ </fo:layout-master-set> <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> - <fo:table table-layout="fixed"> - <fo:table-column column-number="1" /> - <fo:table-column column-number="2" /> - <fo:table-column column-number="3" /> + <fo:table table-layout="fixed" width="100%"> + <fo:table-column number-columns-repeated="3" column-width="proportional-column-width(1)"/> <fo:table-header> <fo:table-row> <fo:table-cell> @@ -82,8 +80,20 @@ </fo:root> </fo> <checks> - <eval expected="360000" xpath="//flow/block/block[4]/@ipd"/> + <eval expected="120000" xpath="//flow/block/block[4]/@ipd"/> <eval expected="72000" xpath="//flow/block/block[4]/@bpd"/> <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=156960,vertical=12960" xpath="//flow/block/block[4]/@background"/> + <eval expected="" xpath="//flow/block/block[4]/@left-offset"/> + + <eval expected="120000" xpath="//flow/block/block[6]/@ipd"/> + <eval expected="72000" xpath="//flow/block/block[6]/@bpd"/> + <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=36960,vertical=12960" xpath="//flow/block/block[6]/@background"/> + <eval expected="120000" xpath="//flow/block/block[6]/@left-offset"/> + + <eval expected="120000" xpath="//flow/block/block[8]/@ipd"/> + <eval expected="72000" xpath="//flow/block/block[8]/@bpd"/> + <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=-83040,vertical=12960" xpath="//flow/block/block[8]/@background"/> + <eval expected="240000" xpath="//flow/block/block[8]/@left-offset"/> + </checks> </testcase> diff --git a/test/layoutengine/standard-testcases/table-row_height.xml b/test/layoutengine/standard-testcases/table-row_height.xml index b158113f6..934afa69f 100644 --- a/test/layoutengine/standard-testcases/table-row_height.xml +++ b/test/layoutengine/standard-testcases/table-row_height.xml @@ -81,27 +81,37 @@ <eval expected="14400" xpath="//flow/block[1]/block[2]/@bpd"/> <!-- row 2 --> - <eval expected="360000" xpath="//flow/block[1]/block[3]/@ipd"/> - <eval expected="20000" xpath="//flow/block[1]/block[3]/@bpd"/> <!-- background-area generated for the row --> + <eval expected="144000" xpath="//flow/block[1]/block[3]/@ipd"/> <!-- background-area generated for the row --> + <eval expected="20000" xpath="//flow/block[1]/block[3]/@bpd"/> <eval expected="color=#ffff00" xpath="//flow/block[1]/block[3]/@background"/> + <eval expected="" xpath="//flow/block[1]/block[3]/@left-offset"/> <eval expected="144000" xpath="//flow/block[1]/block[4]/@ipd"/> <eval expected="20000" xpath="//flow/block[1]/block[4]/@bpd"/> - <eval expected="216000" xpath="//flow/block[1]/block[5]/@ipd"/> + <eval expected="216000" xpath="//flow/block[1]/block[5]/@ipd"/> <!-- background-area generated for the row --> <eval expected="20000" xpath="//flow/block[1]/block[5]/@bpd"/> + <eval expected="color=#ffff00" xpath="//flow/block[1]/block[5]/@background"/> + <eval expected="144000" xpath="//flow/block[1]/block[5]/@left-offset"/> + <eval expected="216000" xpath="//flow/block[1]/block[6]/@ipd"/> + <eval expected="20000" xpath="//flow/block[1]/block[6]/@bpd"/> <!-- row 3 --> - <eval expected="360000" xpath="//flow/block[1]/block[6]/@ipd"/> - <eval expected="20000" xpath="//flow/block[1]/block[6]/@bpd"/> <!-- background-area generated for the row --> - <eval expected="color=#ffa500" xpath="//flow/block[1]/block[6]/@background"/> - <eval expected="144000" xpath="//flow/block[1]/block[7]/@ipd"/> + <eval expected="144000" xpath="//flow/block[1]/block[7]/@ipd"/> <!-- background-area generated for the row --> <eval expected="20000" xpath="//flow/block[1]/block[7]/@bpd"/> - <eval expected="216000" xpath="//flow/block[1]/block[8]/@ipd"/> + <eval expected="color=#ffa500" xpath="//flow/block[1]/block[7]/@background"/> + <eval expected="" xpath="//flow/block[1]/block[7]/@left-offset"/> + <eval expected="144000" xpath="//flow/block[1]/block[8]/@ipd"/> <eval expected="20000" xpath="//flow/block[1]/block[8]/@bpd"/> + <eval expected="216000" xpath="//flow/block[1]/block[9]/@ipd"/> <!-- background-area generated for the row --> + <eval expected="20000" xpath="//flow/block[1]/block[9]/@bpd"/> + <eval expected="color=#ffa500" xpath="//flow/block[1]/block[9]/@background"/> + <eval expected="144000" xpath="//flow/block[1]/block[9]/@left-offset"/> + <eval expected="216000" xpath="//flow/block[1]/block[10]/@ipd"/> + <eval expected="20000" xpath="//flow/block[1]/block[10]/@bpd"/> <!-- row 4 --> - <eval expected="144000" xpath="//flow/block[1]/block[9]/@ipd"/> - <eval expected="14400" xpath="//flow/block[1]/block[9]/@bpd"/> - <eval expected="216000" xpath="//flow/block[1]/block[10]/@ipd"/> - <eval expected="14400" xpath="//flow/block[1]/block[10]/@bpd"/> + <eval expected="144000" xpath="//flow/block[1]/block[11]/@ipd"/> + <eval expected="14400" xpath="//flow/block[1]/block[11]/@bpd"/> + <eval expected="216000" xpath="//flow/block[1]/block[12]/@ipd"/> + <eval expected="14400" xpath="//flow/block[1]/block[12]/@bpd"/> </checks> </testcase> diff --git a/test/layoutengine/standard-testcases/table_backgrounds.xml b/test/layoutengine/standard-testcases/table_backgrounds.xml new file mode 100644 index 000000000..30564ecf7 --- /dev/null +++ b/test/layoutengine/standard-testcases/table_backgrounds.xml @@ -0,0 +1,392 @@ +<?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 backgrounds on table elements. + </p> + </info> + <variables> + <table>../../resources/images/fop-logo-gray-8bit.png</table> + <col>../../resources/images/bgimg72dpi.jpg</col> + <body>../../resources/images/fop-logo-color-24bit.png</body> + <row>../../../examples/fo/graphics/asf-logo.png</row> + <headFoot>../../../examples/fo/graphics/asf-logo.png</headFoot> + <header>../../resources/images/box1.png</header> + </variables> + <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="10in" page-width="5in" margin="0.5in"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + + <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt"> + <fo:flow flow-name="xsl-region-body"> + <fo:block space-after="10pt">Before the table.</fo:block> + <fo:table width="100%" table-layout="fixed" + border-collapse="separate" border-separation="4pt" padding="2pt" + background-color="#F0F0F0" background-image="##table" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center" + border="4pt solid black"> + <fo:table-column column-width="proportional-column-width(1)" + background-color="yellow" background-image="##col" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center"/> + <fo:table-column column-width="proportional-column-width(1)" + background-image="##col" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center"/> + <fo:table-header background-image="##headFoot" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center"> + <fo:table-cell border="2pt solid blue"> + <fo:block>Header 1.1</fo:block> + <fo:block>Header 1.1</fo:block> + <fo:block>Header 1.1</fo:block> + <fo:block>Header 1.1</fo:block> + <fo:block>Header 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid blue" background-color="yellow" + background-image="##header" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center"> + <fo:block>Header 1.2</fo:block> + <fo:block>Header 1.2</fo:block> + <fo:block>Header 1.2</fo:block> + <fo:block>Header 1.2</fo:block> + <fo:block>Header 1.2</fo:block> + </fo:table-cell> + </fo:table-header> + <fo:table-footer background-image="##headFoot" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center"> + <fo:table-cell border="2pt solid blue"> + <fo:block>Footer 1.1</fo:block> + <fo:block>Footer 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid blue"> + <fo:block>Footer 1.2</fo:block> + <fo:block>Footer 1.2</fo:block> + </fo:table-cell> + </fo:table-footer> + <fo:table-body> + <fo:table-row background-image="##row" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center"> + <fo:table-cell border="2pt solid red" number-rows-spanned="2"> + <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 color="orange"> + <fo:block>Cell 1.2</fo:block> + <fo:block>Cell 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row background-image="##row" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center"> + <fo:table-cell border="2pt solid red" color="orange"> + <fo:block>Cell 2.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row background-image="##row" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center"> + <fo:table-cell border="2pt solid red" number-columns-spanned="2"> + <fo:block>Cell 3.1</fo:block> + <fo:block>Cell 3.1</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row background-image="##row" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center"> + <fo:table-cell border="2pt solid red"> + <fo:block>Cell 4.1</fo:block> + <fo:block>Cell 4.1</fo:block> + </fo:table-cell> + <fo:table-cell color="orange"> + <fo:block>Cell 4.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + <fo:table-body background-image="##body" background-repeat="no-repeat" + background-position-horizontal="center" background-position-vertical="center"> + <fo:table-row> + <fo:table-cell border="2pt solid red" number-rows-spanned="2"> + <fo:block>Cell 5.1</fo:block> + <fo:block>Cell 5.1</fo:block> + <fo:block>Cell 5.1</fo:block> + <fo:block>Cell 5.1</fo:block> + <fo:block>Cell 5.1 Line 5</fo:block> + <fo:block>Cell 5.1</fo:block> + <fo:block>Cell 5.1</fo:block> + <fo:block>Cell 5.1</fo:block> + <fo:block>Cell 5.1</fo:block> + <fo:block>Cell 5.1 Line 10</fo:block> + <fo:block>Cell 5.1</fo:block> + </fo:table-cell> + <fo:table-cell color="orange"> + <fo:block>Cell 5.2</fo:block> + <fo:block>Cell 5.2</fo:block> + <fo:block>Cell 5.2</fo:block> + <fo:block>Cell 5.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="2pt solid red" color="orange"> + <fo:block>Cell 6.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> + </fo:root> + + </fo> + <checks> + <!-- table background --> + <eval expected="color=#f0f0f0,url=../../resources/images/fop-logo-gray-8bit.png,repeat=no-repeat,horiz=53480,vertical=108960" + xpath="//flow/block[2]/@background"/> + + <!-- column background, header 1.1 --> + <eval expected="136000" xpath="//flow/block[2]/block[1]/@ipd"/> + <eval expected="50000" xpath="//flow/block[2]/block[1]/@bpd"/> + <eval expected="4000" xpath="//flow/block[2]/block[1]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[1]/@left-offset"/> + <eval xpath="//flow/block[2]/block[1]/@background" + expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=54000"/> + + <!-- table-header background, header 1.1 --> + <eval expected="136000" xpath="//flow/block[2]/block[2]/@ipd"/> + <eval expected="50000" xpath="//flow/block[2]/block[2]/@bpd"/> + <eval expected="4000" xpath="//flow/block[2]/block[2]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[2]/@left-offset"/> + <eval xpath="//flow/block[2]/block[2]/@background" + expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=76633,vertical=5877"/> + + + <!-- column background, header 1.2 --> + <eval expected="136000" xpath="//flow/block[2]/block[4]/@ipd"/> + <eval expected="50000" xpath="//flow/block[2]/block[4]/@bpd"/> + <eval expected="4000" xpath="//flow/block[2]/block[4]/@top-offset"/> + <eval expected="148000" xpath="//flow/block[2]/block[4]/@left-offset"/> + <eval xpath="//flow/block[2]/block[4]/@background" + expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=54000"/> + + <!-- table-header background, header 1.2 --> + <eval expected="136000" xpath="//flow/block[2]/block[5]/@ipd"/> + <eval expected="50000" xpath="//flow/block[2]/block[5]/@bpd"/> + <eval expected="4000" xpath="//flow/block[2]/block[5]/@top-offset"/> + <eval expected="148000" xpath="//flow/block[2]/block[5]/@left-offset"/> + <eval xpath="//flow/block[2]/block[5]/@background" + expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=-67367,vertical=5877"/> + + <!-- header 1.2 background --> + <eval expected="136000" xpath="//flow/block[2]/block[6]/@ipd"/> + <eval expected="50000" xpath="//flow/block[2]/block[6]/@bpd"/> + <eval expected="2000" xpath="//flow/block[2]/block[6]/@top-offset"/> + <eval expected="148000" xpath="//flow/block[2]/block[6]/@left-offset"/> + <eval xpath="//flow/block[2]/block[6]/@background" + expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=47995,vertical=4995"/> + + + <!-- column background, cell 1.2 --> + <eval expected="140000" xpath="//flow/block[2]/block[7]/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/block[7]/@bpd"/> + <eval expected="60000" xpath="//flow/block[2]/block[7]/@top-offset"/> + <eval expected="146000" xpath="//flow/block[2]/block[7]/@left-offset"/> + <eval xpath="//flow/block[2]/block[7]/@background" + expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-26000,vertical=-2000"/> + + <!-- table-row background, cell 1.2 --> + <eval expected="140000" xpath="//flow/block[2]/block[8]/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/block[8]/@bpd"/> + <eval expected="60000" xpath="//flow/block[2]/block[8]/@top-offset"/> + <eval expected="146000" xpath="//flow/block[2]/block[8]/@left-offset"/> + <eval xpath="//flow/block[2]/block[8]/@background" + expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=-65367,vertical=-9122"/> + + + <!-- column background, cell 1.1 --> + <eval expected="136000" xpath="//flow/block[2]/block[10]/@ipd"/> + <eval expected="40000" xpath="//flow/block[2]/block[10]/@bpd"/> + <eval expected="62000" xpath="//flow/block[2]/block[10]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[10]/@left-offset"/> + <eval xpath="//flow/block[2]/block[10]/@background" + expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-4000"/> + + <!-- table-row background, cell 1.1 --> + <eval expected="136000" xpath="//flow/block[2]/block[11]/@ipd"/> + <eval expected="40000" xpath="//flow/block[2]/block[11]/@bpd"/> + <eval expected="62000" xpath="//flow/block[2]/block[11]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[11]/@left-offset"/> + <eval xpath="//flow/block[2]/block[11]/@background" + expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=76633,vertical=-11122"/> + + + <!-- column background, cell 2.2 --> + <eval expected="136000" xpath="//flow/block[2]/block[13]/@ipd"/> + <eval expected="16000" xpath="//flow/block[2]/block[13]/@bpd"/> + <eval expected="86000" xpath="//flow/block[2]/block[13]/@top-offset"/> + <eval expected="148000" xpath="//flow/block[2]/block[13]/@left-offset"/> + <eval xpath="//flow/block[2]/block[13]/@background" + expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-28000"/> + + <!-- table-row background, cell 2.2 --> + <eval expected="136000" xpath="//flow/block[2]/block[14]/@ipd"/> + <eval expected="16000" xpath="//flow/block[2]/block[14]/@bpd"/> + <eval expected="86000" xpath="//flow/block[2]/block[14]/@top-offset"/> + <eval expected="148000" xpath="//flow/block[2]/block[14]/@left-offset"/> + <eval xpath="//flow/block[2]/block[14]/@background" + expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=-67367,vertical=-11122"/> + + + <!-- column background, cell 3.1 --> + <eval expected="280000" xpath="//flow/block[2]/block[16]/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/block[16]/@bpd"/> + <eval expected="110000" xpath="//flow/block[2]/block[16]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[16]/@left-offset"/> + <eval xpath="//flow/block[2]/block[16]/@background" + expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-52000"/> + + <!-- table-row background, cell 3.1 --> + <eval expected="280000" xpath="//flow/block[2]/block[17]/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/block[17]/@bpd"/> + <eval expected="110000" xpath="//flow/block[2]/block[17]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[17]/@left-offset"/> + <eval xpath="//flow/block[2]/block[17]/@background" + expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=76633,vertical=-9122"/> + + + <!-- column background, cell 4.1 --> + <eval expected="136000" xpath="//flow/block[2]/block[19]/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/block[19]/@bpd"/> + <eval expected="138000" xpath="//flow/block[2]/block[19]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[19]/@left-offset"/> + <eval xpath="//flow/block[2]/block[19]/@background" + expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-80000"/> + + <!-- table-row background, cell 4.1 --> + <eval expected="136000" xpath="//flow/block[2]/block[20]/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/block[20]/@bpd"/> + <eval expected="138000" xpath="//flow/block[2]/block[20]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[20]/@left-offset"/> + <eval xpath="//flow/block[2]/block[20]/@background" + expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=76633,vertical=-9122"/> + + + <!-- column background, cell 4.2 --> + <eval expected="140000" xpath="//flow/block[2]/block[22]/@ipd"/> + <eval expected="24000" xpath="//flow/block[2]/block[22]/@bpd"/> + <eval expected="136000" xpath="//flow/block[2]/block[22]/@top-offset"/> + <eval expected="146000" xpath="//flow/block[2]/block[22]/@left-offset"/> + <eval xpath="//flow/block[2]/block[22]/@background" + expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-26000,vertical=-78000"/> + + <!-- table-row background, cell 4.2 --> + <eval expected="140000" xpath="//flow/block[2]/block[23]/@ipd"/> + <eval expected="24000" xpath="//flow/block[2]/block[23]/@bpd"/> + <eval expected="136000" xpath="//flow/block[2]/block[23]/@top-offset"/> + <eval expected="146000" xpath="//flow/block[2]/block[23]/@left-offset"/> + <eval xpath="//flow/block[2]/block[23]/@background" + expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=-65367,vertical=-7122"/> + + + <!-- column background, cell 5.2 --> + <eval expected="140000" xpath="//flow/block[2]/block[25]/@ipd"/> + <eval expected="40000" xpath="//flow/block[2]/block[25]/@bpd"/> + <eval expected="164000" xpath="//flow/block[2]/block[25]/@top-offset"/> + <eval expected="146000" xpath="//flow/block[2]/block[25]/@left-offset"/> + <eval xpath="//flow/block[2]/block[25]/@background" + expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-26000,vertical=-106000"/> + + <!-- table-body background, cell 5.2 --> + <eval expected="140000" xpath="//flow/block[2]/block[26]/@ipd"/> + <eval expected="40000" xpath="//flow/block[2]/block[26]/@bpd"/> + <eval expected="164000" xpath="//flow/block[2]/block[26]/@top-offset"/> + <eval expected="146000" xpath="//flow/block[2]/block[26]/@left-offset"/> + <eval xpath="//flow/block[2]/block[26]/@background" + expected="url=../../resources/images/fop-logo-color-24bit.png,repeat=no-repeat,horiz=-94513,vertical=9964"/> + + + <!-- column background, cell 5.1 --> + <eval expected="136000" xpath="//flow/block[2]/block[28]/@ipd"/> + <eval expected="110000" xpath="//flow/block[2]/block[28]/@bpd"/> + <eval expected="166000" xpath="//flow/block[2]/block[28]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[28]/@left-offset"/> + <eval xpath="//flow/block[2]/block[28]/@background" + expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-108000"/> + + <!-- table-body background, cell 5.1 --> + <eval expected="136000" xpath="//flow/block[2]/block[29]/@ipd"/> + <eval expected="110000" xpath="//flow/block[2]/block[29]/@bpd"/> + <eval expected="166000" xpath="//flow/block[2]/block[29]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[29]/@left-offset"/> + <eval xpath="//flow/block[2]/block[29]/@background" + expected="url=../../resources/images/fop-logo-color-24bit.png,repeat=no-repeat,horiz=47487,vertical=7964"/> + + + <!-- column background, cell 6.2 --> + <eval expected="136000" xpath="//flow/block[2]/block[31]/@ipd"/> + <eval expected="66000" xpath="//flow/block[2]/block[31]/@bpd"/> + <eval expected="210000" xpath="//flow/block[2]/block[31]/@top-offset"/> + <eval expected="148000" xpath="//flow/block[2]/block[31]/@left-offset"/> + <eval xpath="//flow/block[2]/block[31]/@background" + expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-152000"/> + + <!-- table-body background, cell 6.2 --> + <eval expected="136000" xpath="//flow/block[2]/block[32]/@ipd"/> + <eval expected="66000" xpath="//flow/block[2]/block[32]/@bpd"/> + <eval expected="210000" xpath="//flow/block[2]/block[32]/@top-offset"/> + <eval expected="148000" xpath="//flow/block[2]/block[32]/@left-offset"/> + <eval xpath="//flow/block[2]/block[32]/@background" + expected="url=../../resources/images/fop-logo-color-24bit.png,repeat=no-repeat,horiz=-96513,vertical=-36036"/> + + + <!-- column background, footer 1.1 --> + <eval expected="136000" xpath="//flow/block[2]/block[34]/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/block[34]/@bpd"/> + <eval expected="284000" xpath="//flow/block[2]/block[34]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[34]/@left-offset"/> + <eval xpath="//flow/block[2]/block[34]/@background" + expected="color=#ffff00,url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-226000"/> + + <!-- table-footer background, footer 1.1 --> + <eval expected="136000" xpath="//flow/block[2]/block[35]/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/block[35]/@bpd"/> + <eval expected="284000" xpath="//flow/block[2]/block[35]/@top-offset"/> + <eval expected="4000" xpath="//flow/block[2]/block[35]/@left-offset"/> + <eval xpath="//flow/block[2]/block[35]/@background" + expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=76633,vertical=-9122"/> + + + <!-- column background, footer 1.2 --> + <eval expected="136000" xpath="//flow/block[2]/block[37]/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/block[37]/@bpd"/> + <eval expected="284000" xpath="//flow/block[2]/block[37]/@top-offset"/> + <eval expected="148000" xpath="//flow/block[2]/block[37]/@left-offset"/> + <eval xpath="//flow/block[2]/block[37]/@background" + expected="url=../../resources/images/bgimg72dpi.jpg,repeat=no-repeat,horiz=-28000,vertical=-226000"/> + + <!-- table-footer background, footer 1.2 --> + <eval expected="136000" xpath="//flow/block[2]/block[38]/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/block[38]/@bpd"/> + <eval expected="284000" xpath="//flow/block[2]/block[38]/@top-offset"/> + <eval expected="148000" xpath="//flow/block[2]/block[38]/@left-offset"/> + <eval xpath="//flow/block[2]/block[38]/@background" + expected="url=../../../examples/fo/graphics/asf-logo.png,repeat=no-repeat,horiz=-67367,vertical=-9122"/> + + </checks> +</testcase> |