diff options
Diffstat (limited to 'test/layoutengine')
25 files changed, 1432 insertions, 714 deletions
diff --git a/test/layoutengine/disabled-testcases.xml b/test/layoutengine/disabled-testcases.xml index 15ac8aa48..b4de16ef4 100644 --- a/test/layoutengine/disabled-testcases.xml +++ b/test/layoutengine/disabled-testcases.xml @@ -233,54 +233,6 @@ <description>Column balancing doesn't work as expected.</description> </testcase> <testcase> - <name>No background-images on table-body</name> - <file>table-body_background-image.xml</file> - <description>The backgrounds of table-body, table-header, - table-footer and table-column are not painted, yet.</description> - </testcase> - <testcase> - <name>Collapsing Border Model NYI</name> - <file>table_border-collapse_collapse_1.xml</file> - <description>Border-collapse="collapse" is not yet - implemented.</description> - </testcase> - <testcase> - <name>Collapsing Border Model NYI</name> - <file>table_border-collapse_collapse_2.xml</file> - <description>Border-collapse="collapse" is not yet - implemented.</description> - </testcase> - <testcase> - <name>Problems with border and padding on tables</name> - <file>table_border_padding.xml</file> - <description>The element list seems to not be fully correct, yet, causing - the layout to look odd.</description> - </testcase> - <testcase> - <name>keep-with-previous doesn't work inside tables</name> - <file>table-cell_block_keep-with-previous.xml</file> - <description>Keep-with-previous doesn't work inside tables and - lists, yet.</description> - </testcase> - <testcase> - <name>Border and padding conditionality is NYI on table-cells</name> - <file>table-cell_border_padding_conditionality.xml</file> - <description>Border and padding conditionality are not supported - on table-cells, yet.</description> - </testcase> - <testcase> - <name>No background-images on table-header</name> - <file>table-header_background-image.xml</file> - <description>The backgrounds of table-body, table-header, - table-footer and table-column are not painted, yet.</description> - </testcase> - <testcase> - <name>keep-with-previous doesn't work on table-rows</name> - <file>table-row_keep-with-previous.xml</file> - <description>Keep-with-previous doesn't work inside tables and - lists, yet.</description> - </testcase> - <testcase> <name>table-cell empty area with marker.xml</name> <file>table-cell_empty_area_with_marker.xml</file> <description>A table-cell producing an empty area does currently not add any markers to a page. diff --git a/test/layoutengine/standard-testcases/block-container_absolute-position_no-height_3.xml b/test/layoutengine/standard-testcases/block-container_absolute-position_no-height_3.xml new file mode 100644 index 000000000..d2eba0d3c --- /dev/null +++ b/test/layoutengine/standard-testcases/block-container_absolute-position_no-height_3.xml @@ -0,0 +1,63 @@ +<?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 absolutely positioned block-containers with auto-height and shrinks. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal"> + <fo:flow flow-name="xsl-region-body"> + <fo:block-container id="bc0" width="80pt" absolute-position="absolute" + left="10pt" top="10pt" overflow="visible" + keep-together.within-column="always" + background-color="lightgray"> + <fo:block space-after.maximum="1em" space-after.optimum="0.3em" + space-before.maximum="1em" space-before.optimum="0.3em"> + Lorem ipsum dolor sit amet. + </fo:block> + <fo:block space-after.maximum="1em" space-after.optimum="0.3em" + space-before.maximum="1em" space-before.optimum="0.3em"> + Lorem ipsum dolor sit amet. + </fo:block> + <fo:block space-after.maximum="1em" space-after.optimum="0.3em" + space-before.maximum="1em" space-before.optimum="0.3em"> + Lorem ipsum dolor sit amet. + </fo:block> + </fo:block-container> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="93600" xpath="//block[@prod-id='bc0' and boolean(@is-reference-area)]/@bpd"/> + <eval expected="28800" xpath="//block[@prod-id='bc0' and boolean(@is-reference-area)]/block[1]/@bpda"/> + <eval expected="32400" xpath="//block[@prod-id='bc0' and boolean(@is-reference-area)]/block[2]/@bpda"/> + <eval expected="32400" xpath="//block[@prod-id='bc0' and boolean(@is-reference-area)]/block[3]/@bpda"/> + <eval expected="3600" xpath="//block[@prod-id='bc0' and boolean(@is-reference-area)]/block[2]/@space-before"/> + <eval expected="3600" xpath="//block[@prod-id='bc0' and boolean(@is-reference-area)]/block[3]/@space-before"/> + </checks> +</testcase> diff --git a/test/layoutengine/standard-testcases/block-level_break-after_bug44412.xml b/test/layoutengine/standard-testcases/block-level_break-after_bug44412.xml new file mode 100644 index 000000000..523d22c6f --- /dev/null +++ b/test/layoutengine/standard-testcases/block-level_break-after_bug44412.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<testcase> + <info> + <p> + This test checks Bugzilla #44412 where the border-after of an fo:block wasn't painted in + case break-after is present. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" page-height="5in" page-width="5in" margin="20pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:block>Before the block</fo:block> + <fo:block id="b1" border="4pt solid black" break-before="column" break-after="column">A block with + borders and break-before and break-after.</fo:block> + <fo:block>After the block</fo:block> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:block-container id="bc1" border="4pt solid black" break-after="column"> + <fo:block>A block-container with borders and break-after.</fo:block> + </fo:block-container> + <fo:block>After the block-container</fo:block> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:list-block id="lb1" border="4pt solid black" break-after="column"> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body> + <fo:block start-indent="body-start()">Blaaaaaah</fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + <fo:block>After the list-block</fo:block> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:list-block> + <fo:list-item id="li1" border="4pt solid black" break-after="column"> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body> + <fo:block start-indent="body-start()">Blaaaaaah</fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + <fo:block>After the list-item</fo:block> + </fo:flow> + </fo:page-sequence> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:table table-layout="fixed" width="100%" id="tbl1" border="4pt solid black" break-after="column"> + <fo:table-column column-width="proportional-column-width(1)"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell> + <fo:block>Blaaaaah</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:block>After the table</fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="1" xpath="count(//block[@prod-id = 'b1'])"/> + <eval expected="4000 4000 4000 4000" xpath="//block[@prod-id = 'b1']/@bap"/> + + <eval expected="2" xpath="count(//block[@prod-id = 'bc1'])"/> <!-- 2 because viewport/ref pair --> + <eval expected="4000 4000 4000 4000" xpath="//block[@prod-id = 'bc1'][1]/@bap"/> + + <eval expected="1" xpath="count(//block[@prod-id = 'lb1'])"/> + <eval expected="4000 4000 4000 4000" xpath="//block[@prod-id = 'lb1']/@bap"/> + + <eval expected="1" xpath="count(//block[@prod-id = 'li1'])"/> + <eval expected="4000 4000 4000 4000" xpath="//block[@prod-id = 'li1']/@bap"/> + + <eval expected="1" xpath="count(//block[@prod-id = 'tbl1'])"/> + <eval expected="4000 4000 4000 4000" xpath="//block[@prod-id = 'tbl1']/block[1]/@bap"/> + </checks> +</testcase> diff --git a/test/layoutengine/standard-testcases/block_break-before_bug44412.xml b/test/layoutengine/standard-testcases/block_break-before_bug44412.xml new file mode 100644 index 000000000..9ef4150b5 --- /dev/null +++ b/test/layoutengine/standard-testcases/block_break-before_bug44412.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<testcase> + <info> + <p> + This test checks Bugzilla #44412 where a break-before on the first child of an otherwise + empty block is set. It is expected that the parent block creates two areas, the first with + only border-before on the first page and zero bpd. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" page-height="5in" page-width="5in" margin="20pt"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:block>Before the block</fo:block> + <fo:block id="b1" border="4pt solid black"> + <fo:block break-before="page">The break-before set on this block causes the parent + block to produce an empty block area with only a border before on the + first page.</fo:block> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="2" xpath="count(//block[@prod-id = 'b1'])"/> + <eval expected="4000 4000 4000 0" xpath="(//block[@prod-id = 'b1'])[1]/@bap"/> + <eval expected="4000 4000 0 4000" xpath="(//block[@prod-id = 'b1'])[2]/@bap"/> + <eval expected="0" xpath="(//block[@prod-id = 'b1'])[1]/@bpd"/> + <eval expected="43200" xpath="(//block[@prod-id = 'b1'])[2]/@bpd"/> + + <element-list category="breaker" index="0"> + <box w="14400"/> + <penalty w="0" p="0"/> + <box w="0" aux="true"/> + <penalty w="0" p="INF"/> + <glue w="4000"/> <!-- border-before --> + <box w="0"/> <!-- first block area of the "b1" block with zero bpd --> + + <skip>3</skip> + </element-list> + </checks> +</testcase> diff --git a/test/layoutengine/standard-testcases/inline_block-level_nested_1.xml b/test/layoutengine/standard-testcases/inline_block-level_nested_1.xml new file mode 100644 index 000000000..6b6761dee --- /dev/null +++ b/test/layoutengine/standard-testcases/inline_block-level_nested_1.xml @@ -0,0 +1,104 @@ +<?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 fo:inline and nested block-level nodes. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="6in"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal"> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + <fo:inline>before + <fo:list-block> + <fo:list-item> + <fo:list-item-label end-indent="label-end()"> + <fo:block>•</fo:block> + </fo:list-item-label> + <fo:list-item-body start-indent="body-start()"> + <fo:block id="list-item-body1">Inline list item one.</fo:block> + </fo:list-item-body> + </fo:list-item> + </fo:list-block> + after</fo:inline> + </fo:block> + <fo:block space-before="0.5em"> + <fo:inline>before + <fo:table table-layout="fixed" width="100%"> + <fo:table-column column-width="proportional-column-width(1)" + number-columns-repeated="2"/>" + <fo:table-body> + <fo:table-row> + <fo:table-cell id="table-cell1"> + <fo:block>cell1</fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block>cell2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + after</fo:inline> + </fo:block> + <fo:block space-before="0.5em"> + <fo:inline>before + <fo:block-container> + <fo:block id="block-in-bc">block in block-container</fo:block> + </fo:block-container> + after</fo:inline> + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <element-list category="breaker"> + <box w="14400"/> + <penalty w="0" p="0"/> + <box w="14400"/> + <penalty w="0" p="0"/> + <box w="14400"/> + <penalty w="0" p="0"/> + <glue w="6000" aux="true"/> + <box w="14400"/> + <penalty w="0" p="0"/> + <box w="14400"/> + <penalty w="0" p="0"/> + <box w="14400"/> + <penalty w="0" p="0"/> + <glue w="6000" aux="true"/> + <box w="14400"/> + <penalty w="0" p="0"/> + <box w="14400"/> + <penalty w="0" p="0"/> + <box w="14400"/> + <skip>3</skip> + </element-list> + <true xpath="boolean(//block[@prod-id='list-item-body1'])"/> + <true xpath="boolean(//block[@prod-id='table-cell1'])"/> + <true xpath="boolean(//block[@prod-id='block-in-bc'])"/> + </checks> +</testcase> diff --git a/test/layoutengine/standard-testcases/table-body_background-image.xml b/test/layoutengine/standard-testcases/table-body_background-image.xml deleted file mode 100644 index 2a9aa9362..000000000 --- a/test/layoutengine/standard-testcases/table-body_background-image.xml +++ /dev/null @@ -1,110 +0,0 @@ -<?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 background image on a fo:table-body. - </p> - </info> - <variables> - <img>../../resources/images/bgimg300dpi.jpg</img> - </variables> - <fo> - <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> - <fo:layout-master-set> - <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> - <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:table> - <fo:table-column column-number="1" /> - <fo:table-column column-number="2" /> - <fo:table-column column-number="3" /> - <fo:table-header> - <fo:table-row> - <fo:table-cell> - <fo:block>Header Col 1</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Header Col 2</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Header Col 3</fo:block> - </fo:table-cell> - </fo:table-row> - </fo:table-header> - <fo:table-body background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img"> - <fo:table-row> - <fo:table-cell> - <fo:block>Row 1 Col 1</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 1 Col 2</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 1 Col 3</fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell> - <fo:block>Row 2 Col 1</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 2 Col 2</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 2 Col 3</fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell> - <fo:block>Row 3 Col 1</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 3 Col 2</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 3 Col 3</fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell> - <fo:block>Row 4 Col 1</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 4 Col 2</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 4 Col 3</fo:block> - </fo:table-cell> - </fo:table-row> - </fo:table-body> - </fo:table> - <fo:block>Table with centered background image on body</fo:block> - </fo:flow> - </fo:page-sequence> - </fo:root> - </fo> - <checks> - <!-- backgrounds on table-body are not supported at the time this test - was written. Therefore no checks! --> - </checks> -</testcase> diff --git a/test/layoutengine/standard-testcases/table-cell_block_keep-with-previous.xml b/test/layoutengine/standard-testcases/table-cell_block_keep-with-previous.xml deleted file mode 100644 index 00257a10a..000000000 --- a/test/layoutengine/standard-testcases/table-cell_block_keep-with-previous.xml +++ /dev/null @@ -1,85 +0,0 @@ -<?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 keep-with-previous on content inside tables. - </p> - </info> - <fo> - <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg" white-space-collapse="true" widows="0" orphans="0"> - <fo:layout-master-set> - <fo:simple-page-master master-name="normal" page-width="5in" page-height="4.5 * 14.4pt"> - <fo:region-body/> - </fo:simple-page-master> - </fo:layout-master-set> - <fo:page-sequence master-reference="normal"> - <fo:flow flow-name="xsl-region-body"> - <fo:block>block1</fo:block> - <fo:table table-layout="fixed"> - <fo:table-column/> - <fo:table-column/> - <fo:table-body> - <fo:table-row> - <fo:table-cell id="cell1"> - <fo:block keep-with-previous.within-page="always">line1</fo:block> - <fo:block>line2</fo:block> - </fo:table-cell> - <fo:table-cell id="cell2"> - <fo:block>line1</fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell id="cell3"> - <fo:block>line1</fo:block> - </fo:table-cell> - <fo:table-cell id="cell4"> - <fo:block keep-with-previous.within-page="always">line1</fo:block> - </fo:table-cell> - </fo:table-row> - </fo:table-body> - </fo:table> - <fo:block>block2</fo:block> - </fo:flow> - </fo:page-sequence> - </fo:root> - </fo> - <checks> - <element-list category="table-cell" id="cell1"> - <box w="14400"/> - <penalty w="0" p="0"/> - <box w="14400"/> - </element-list> - <element-list category="table-cell" id="cell2"> - <box w="14400"/> - </element-list> - <element-list category="breaker" index="0"> - <box w="14400"/> - <penalty w="0" p="INF"/> - <box w="14400"/> - <penalty w="0" p="INF"/> - <box w="14400"/> - <penalty w="0" p="INF"/> - <box w="14400"/> - <penalty w="0" p="0"/> - <box w="14400"/> - <skip>3</skip> - </element-list> - </checks> -</testcase> 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_background-image.xml b/test/layoutengine/standard-testcases/table-header_background-image.xml deleted file mode 100644 index f74c13b0d..000000000 --- a/test/layoutengine/standard-testcases/table-header_background-image.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?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 background image on a fo:table-header and footer. - </p> - </info> - <variables> - <img>../../resources/images/bgimg300dpi.jpg</img> - </variables> - <fo> - <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> - <fo:layout-master-set> - <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> - <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:table> - <fo:table-column column-number="1" /> - <fo:table-column column-number="2" /> - <fo:table-column column-number="3" /> - <fo:table-header background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img"> - <fo:table-row> - <fo:table-cell> - <fo:block>Header Col 1</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Header Col 2</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Header Col 3</fo:block> - </fo:table-cell> - </fo:table-row> - </fo:table-header> - <fo:table-footer background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img"> - <fo:table-row> - <fo:table-cell> - <fo:block>Footer Col 1</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Footer Col 2</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Footer Col 3</fo:block> - </fo:table-cell> - </fo:table-row> - </fo:table-footer> - <fo:table-body background-color="blue"> - <fo:table-row height="4in" background-color="blue"> - <fo:table-cell> - <fo:block>Row 1 Col 1</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 1 Col 2</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 1 Col 3</fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row height="4in" background-color="blue"> - <fo:table-cell> - <fo:block>Row 2 Col 1</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 2 Col 2</fo:block> - </fo:table-cell> - <fo:table-cell> - <fo:block>Row 2 Col 3</fo:block> - </fo:table-cell> - </fo:table-row> - </fo:table-body> - </fo:table> - <fo:block>Table with centered background image in header and footer</fo:block> - </fo:flow> - </fo:page-sequence> - </fo:root> - </fo> - <checks> - <!-- backgrounds on table-header/footer are not supported at the time this test - was written. Therefore no checks! --> - </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-row_keep-with-previous.xml b/test/layoutengine/standard-testcases/table-row_keep-with-previous.xml index 34a8be4c1..e6131308a 100644 --- a/test/layoutengine/standard-testcases/table-row_keep-with-previous.xml +++ b/test/layoutengine/standard-testcases/table-row_keep-with-previous.xml @@ -19,66 +19,236 @@ <testcase> <info> <p> - This test checks keep-with-previous on table-rows. + This test checks that keep-with-previous works on table-row. </p> </info> <fo> - <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg" white-space-collapse="true" widows="0" orphans="0"> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> - <fo:simple-page-master master-name="normal" page-width="5in" page-height="4.5 * 14.4pt"> - <fo:region-body/> + <fo:simple-page-master master-name="page" page-height="3in" page-width="5in" + margin="0.5in"> + <fo:region-body background-color="#F0F0F0"/> </fo:simple-page-master> </fo:layout-master-set> - <fo:page-sequence master-reference="normal"> + + <!-- table 1 --> + <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt"> <fo:flow flow-name="xsl-region-body"> - <fo:block space-after="1.5*14.4pt">block1</fo:block> - <fo:table table-layout="fixed" width="100%"> - <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/> + <fo:block space-after="106pt">1. Before the table</fo:block> + <fo:table width="100%" table-layout="fixed" + 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 keep-with-previous.within-page="always"> - <fo:table-cell id="cell1"> - <fo:block>line1</fo:block> - <fo:block>line2</fo:block> + <fo:table-row> + <fo:table-cell border="2pt solid blue"> + <fo:block>Cell 1.1 Line 1</fo:block> + <fo:block>Cell 1.1 Line 2</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid teal"> + <fo:block>Cell 1.2 Line 1</fo:block> + <fo:block>Cell 1.2 Line 2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row keep-with-previous="always"> + <fo:table-cell border="2pt solid green"> + <fo:block>Cell 2.1 Line 1</fo:block> + <fo:block>Cell 2.1 Line 2</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid olive"> + <fo:block>Cell 3.1 Line 1</fo:block> + <fo:block>Cell 3.1 Line 2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:block>After the table</fo:block> + </fo:flow> + </fo:page-sequence> + + <!-- table 2 --> + <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt"> + <fo:flow flow-name="xsl-region-body"> + <fo:block space-after="106pt">2. Before the table</fo:block> + <fo:table width="100%" table-layout="fixed" + 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> + <fo:table-cell border="2pt solid blue"> + <fo:block>Cell 1.1 Line 1</fo:block> + <fo:block>Cell 1.1 Line 2</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid teal" number-rows-spanned="2"> + <fo:block>Cell 1.2 Line 1</fo:block> + <fo:block>Cell 1.2 Line 2</fo:block> </fo:table-cell> - <fo:table-cell id="cell2"> - <fo:block>line1</fo:block> + </fo:table-row> + <fo:table-row keep-with-previous="always"> + <fo:table-cell border="2pt solid green"> + <fo:block>Cell 2.1 Line 1</fo:block> + <fo:block>Cell 2.1 Line 2</fo:block> </fo:table-cell> </fo:table-row> - <fo:table-row keep-with-previous.within-page="always"> - <fo:table-cell id="cell3"> - <fo:block>line1</fo:block> + </fo:table-body> + </fo:table> + <fo:block>After the table</fo:block> + </fo:flow> + </fo:page-sequence> + + <!-- table 3 --> + <fo:page-sequence master-reference="page" font-size="8pt" line-height="10pt"> + <fo:flow flow-name="xsl-region-body"> + <fo:block space-after="124">3. Before the table</fo:block> + <fo:block>Before the table</fo:block> + <fo:table width="100%" table-layout="fixed" + border-collapse="collapse" border="4pt solid black"> + <fo:table-column number-columns-repeated="2" + column-width="proportional-column-width(1)"/> + <fo:table-body> + <fo:table-row keep-with-previous="always"> + <fo:table-cell border="2pt solid blue" number-rows-spanned="2"> + <fo:block>Cell 1.1 Line 1</fo:block> + <fo:block>Cell 1.1 Line 2</fo:block> </fo:table-cell> - <fo:table-cell id="cell4"> - <fo:block>line1</fo:block> + <fo:table-cell border="2pt solid teal"> + <fo:block>Cell 1.2 Line 1</fo:block> + <fo:block>Cell 1.2 Line 2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="2pt solid olive"> + <fo:block>Cell 2.1 Line 1</fo:block> + <fo:block>Cell 2.1 Line 2</fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> - <fo:block>block2</fo:block> + <fo:block>After the table</fo:block> </fo:flow> </fo:page-sequence> + </fo:root> </fo> <checks> - <element-list category="table-cell" id="cell1"> - <box w="14400"/> - <penalty w="0" p="0"/> - <box w="14400"/> - </element-list> - <element-list category="table-cell" id="cell2"> - <box w="14400"/> - </element-list> - <element-list category="breaker" index="0"> - <box w="14400"/> - <penalty w="0" p="INF"/> - <box w="14400"/> - <penalty w="0" p="INF"/> - <box w="14400"/> - <penalty w="0" p="INF"/> - <box w="14400"/> - <penalty w="0" p="0"/> - <box w="14400"/> - <skip>3</skip> - </element-list> + + <!-- table 1 --> + <eval expected="2" xpath="count(//pageSequence[1]/pageViewport)"/> + <!-- page 1 --> + <eval expected="2" xpath="count(//pageViewport[@nr=1]//flow/block)"/> + <eval expected="1. Before the table" xpath="//pageViewport[@nr=1]//flow/block[1]/lineArea"/> + <eval expected="12000" xpath="//pageViewport[@nr=1]//flow/block[2]/@bpd"/> + <eval expected="16000" xpath="//pageViewport[@nr=1]//flow/block[2]/@bpda"/> + <eval expected="(solid,#000000,4000)" xpath="//pageViewport[@nr=1]//flow/block[2]/@border-before"/> + <eval expected="" xpath="//pageViewport[@nr=1]//flow/block[2]/@border-after"/> + <!-- cell 1.1 --> + <eval expected="10000" xpath="//pageViewport[@nr=1]//flow/block[2]/block[1]/@bpd"/> + <eval expected="12000" xpath="//pageViewport[@nr=1]//flow/block[2]/block[1]/@bpda"/> + <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr=1]//flow/block[2]/block[1]/@border-before"/> + <eval expected="" xpath="//pageViewport[@nr=1]//flow/block[2]/block[1]/@border-after"/> + <eval expected="1" xpath="count(//pageViewport[@nr=1]//flow/block[2]/block[1]/block)"/> + <eval expected="Cell 1.1 Line 1" xpath="//pageViewport[@nr=1]//flow/block[2]/block[1]/block/lineArea"/> + <!-- cell 1.2 --> + <eval expected="10000" xpath="//pageViewport[@nr=1]//flow/block[2]/block[2]/@bpd"/> + <eval expected="12000" xpath="//pageViewport[@nr=1]//flow/block[2]/block[2]/@bpda"/> + <eval expected="(solid,#008080,2000)" 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="1" xpath="count(//pageViewport[@nr=1]//flow/block[2]/block[2]/block)"/> + <eval expected="Cell 1.2 Line 1" xpath="//pageViewport[@nr=1]//flow/block[2]/block[2]/block/lineArea"/> + <!-- page 2 --> + <eval expected="2" xpath="count(//pageViewport[@nr=2]//flow/block)"/> + <eval expected="After the table" xpath="//pageViewport[@nr=2]//flow/block[2]/lineArea"/> + <eval expected="36000" xpath="//pageViewport[@nr=2]//flow/block[1]/@bpd"/> + <eval expected="40000" xpath="//pageViewport[@nr=2]//flow/block[1]/@bpda"/> + <eval expected="" xpath="//pageViewport[@nr=2]//flow/block[1]/@border-before"/> + <eval expected="(solid,#000000,4000)" xpath="//pageViewport[@nr=2]//flow/block[1]/@border-after"/> + <!-- cell 1.1 --> + <eval expected="10000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@bpd"/> + <eval expected="12000" 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="(solid,#0000ff,2000)" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/@border-after"/> + <eval expected="1" xpath="count(//pageViewport[@nr=2]//flow/block[1]/block[1]/block)"/> + <eval expected="Cell 1.1 Line 2" xpath="//pageViewport[@nr=2]//flow/block[1]/block[1]/block/lineArea"/> + <!-- cell 1.2 --> + <eval expected="10000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@bpd"/> + <eval expected="12000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@bpda"/> + <eval expected="" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@border-before"/> + <eval expected="(solid,#008080,2000)" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/@border-after"/> + <eval expected="1" xpath="count(//pageViewport[@nr=2]//flow/block[1]/block[2]/block)"/> + <eval expected="Cell 1.2 Line 2" xpath="//pageViewport[@nr=2]//flow/block[1]/block[2]/block/lineArea"/> + <!-- cell 2.1 --> + <eval expected="20000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[3]/@bpd"/> + <eval expected="24000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[3]/@bpda"/> + <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr=2]//flow/block[1]/block[3]/@border-before"/> + <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr=2]//flow/block[1]/block[3]/@border-after"/> + <!-- cell 2.2 --> + <eval expected="20000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[4]/@bpd"/> + <eval expected="24000" xpath="//pageViewport[@nr=2]//flow/block[1]/block[4]/@bpda"/> + <eval expected="(solid,#808000,2000)" xpath="//pageViewport[@nr=2]//flow/block[1]/block[4]/@border-before"/> + <eval expected="(solid,#808000,2000)" xpath="//pageViewport[@nr=2]//flow/block[1]/block[4]/@border-after"/> + + <!-- table 2 --> + <eval expected="2" xpath="count(//pageSequence[2]/pageViewport)"/> + <!-- page 1 --> + <eval expected="2" xpath="count(//pageViewport[@nr=3]//flow/block)"/> + <eval expected="2. Before the table" xpath="//pageViewport[@nr=3]//flow/block[1]/lineArea"/> + <eval expected="12000" xpath="//pageViewport[@nr=3]//flow/block[2]/@bpd"/> + <eval expected="16000" xpath="//pageViewport[@nr=3]//flow/block[2]/@bpda"/> + <eval expected="(solid,#000000,4000)" xpath="//pageViewport[@nr=3]//flow/block[2]/@border-before"/> + <eval expected="" xpath="//pageViewport[@nr=3]//flow/block[2]/@border-after"/> + <!-- cell 1.1 --> + <eval expected="10000" xpath="//pageViewport[@nr=3]//flow/block[2]/block[1]/@bpd"/> + <eval expected="12000" xpath="//pageViewport[@nr=3]//flow/block[2]/block[1]/@bpda"/> + <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr=3]//flow/block[2]/block[1]/@border-before"/> + <eval expected="" xpath="//pageViewport[@nr=3]//flow/block[2]/block[1]/@border-after"/> + <eval expected="1" xpath="count(//pageViewport[@nr=3]//flow/block[2]/block[1]/block)"/> + <eval expected="Cell 1.1 Line 1" xpath="//pageViewport[@nr=3]//flow/block[2]/block[1]/block/lineArea"/> + <!-- cell 1.2 --> + <eval expected="10000" xpath="//pageViewport[@nr=3]//flow/block[2]/block[2]/@bpd"/> + <eval expected="12000" xpath="//pageViewport[@nr=3]//flow/block[2]/block[2]/@bpda"/> + <eval expected="(solid,#008080,2000)" xpath="//pageViewport[@nr=3]//flow/block[2]/block[2]/@border-before"/> + <eval expected="" xpath="//pageViewport[@nr=3]//flow/block[2]/block[2]/@border-after"/> + <eval expected="1" xpath="count(//pageViewport[@nr=3]//flow/block[2]/block[2]/block)"/> + <eval expected="Cell 1.2 Line 1" xpath="//pageViewport[@nr=3]//flow/block[2]/block[2]/block/lineArea"/> + <!-- page 2 --> + <eval expected="2" xpath="count(//pageViewport[@nr=4]//flow/block)"/> + <eval expected="After the table" xpath="//pageViewport[@nr=4]//flow/block[2]/lineArea"/> + <eval expected="36000" xpath="//pageViewport[@nr=4]//flow/block[1]/@bpd"/> + <eval expected="40000" xpath="//pageViewport[@nr=4]//flow/block[1]/@bpda"/> + <eval expected="" xpath="//pageViewport[@nr=4]//flow/block[1]/@border-before"/> + <eval expected="(solid,#000000,4000)" xpath="//pageViewport[@nr=4]//flow/block[1]/@border-after"/> + <!-- cell 1.1 --> + <eval expected="10000" xpath="//pageViewport[@nr=4]//flow/block[1]/block[1]/@bpd"/> + <eval expected="12000" xpath="//pageViewport[@nr=4]//flow/block[1]/block[1]/@bpda"/> + <eval expected="" xpath="//pageViewport[@nr=4]//flow/block[1]/block[1]/@border-before"/> + <eval expected="(solid,#0000ff,2000)" xpath="//pageViewport[@nr=4]//flow/block[1]/block[1]/@border-after"/> + <eval expected="1" xpath="count(//pageViewport[@nr=4]//flow/block[1]/block[1]/block)"/> + <eval expected="Cell 1.1 Line 2" xpath="//pageViewport[@nr=4]//flow/block[1]/block[1]/block/lineArea"/> + <!-- cell 2.1 --> + <eval expected="20000" xpath="//pageViewport[@nr=4]//flow/block[1]/block[2]/@bpd"/> + <eval expected="24000" xpath="//pageViewport[@nr=4]//flow/block[1]/block[2]/@bpda"/> + <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr=4]//flow/block[1]/block[2]/@border-before"/> + <eval expected="(solid,#008000,2000)" xpath="//pageViewport[@nr=4]//flow/block[1]/block[2]/@border-after"/> + <!-- cell 1.2 --> + <eval expected="34000" xpath="//pageViewport[@nr=4]//flow/block[1]/block[3]/@bpd"/> + <eval expected="36000" xpath="//pageViewport[@nr=4]//flow/block[1]/block[3]/@bpda"/> + <eval expected="" xpath="//pageViewport[@nr=4]//flow/block[1]/block[3]/@border-before"/> + <eval expected="(solid,#008080,2000)" xpath="//pageViewport[@nr=4]//flow/block[1]/block[3]/@border-after"/> + <eval expected="1" xpath="count(//pageViewport[@nr=4]//flow/block[1]/block[3]/block)"/> + <eval expected="Cell 1.2 Line 2" xpath="//pageViewport[@nr=4]//flow/block[1]/block[3]/block/lineArea"/> + + <!-- table 3 --> + <eval expected="2" xpath="count(//pageSequence[3]/pageViewport)"/> + <!-- page 1 --> + <eval expected="1" xpath="count(//pageViewport[@nr=5]//flow/block)"/> + <eval expected="3. Before the table" xpath="//pageViewport[@nr=5]//flow/block[1]/lineArea"/> + <!-- page 2 --> + <eval expected="3" xpath="count(//pageViewport[@nr=6]//flow/block)"/> + <eval expected="Before the table" xpath="//pageViewport[@nr=6]//flow/block[1]/lineArea"/> + <eval expected="46000" xpath="//pageViewport[@nr=6]//flow/block[2]/@bpd"/> + <eval expected="46000" xpath="//pageViewport[@nr=6]//flow/block[2]/@bpda"/> + <eval expected="After the table" xpath="//pageViewport[@nr=6]//flow/block[3]/lineArea"/> + </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> diff --git a/test/layoutengine/standard-testcases/table_backgrounds_2.xml b/test/layoutengine/standard-testcases/table_backgrounds_2.xml new file mode 100644 index 000000000..300d54234 --- /dev/null +++ b/test/layoutengine/standard-testcases/table_backgrounds_2.xml @@ -0,0 +1,113 @@ +<?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 background painting for fo:table-row, fo:table-body and fo:table-column + when the cells use padding. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal"> + <fo:flow flow-name="xsl-region-body"> + <fo:table table-layout="fixed" width="100%"> + <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell id="bg-cell" padding="2pt 3pt 4pt 5pt" border="solid 2pt" background-color="lightgray"> + <fo:block>background on cell</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt 3pt 4pt 5pt" border="solid 2pt" background-color="lightgray"> + <fo:block>background on cell</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row background-color="yellow"> + <fo:table-cell id="bg-row" padding="2pt 3pt 4pt 5pt" border="solid 2pt"> + <fo:block>background on row</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt 3pt 4pt 5pt" border="solid 2pt"> + <fo:block>background on row</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + <fo:table-body background-color="orange"> + <fo:table-row> + <fo:table-cell id="bg-body" padding="2pt 3pt 4pt 5pt" border="solid 2pt"> + <fo:block>background on body</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt 3pt 4pt 5pt" border="solid 2pt"> + <fo:block>background on body</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:table table-layout="fixed" width="100%"> + <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2" + background-color="violet"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell id="bg-col" padding="2pt 3pt 4pt 5pt" border="solid 2pt"> + <fo:block>background on column</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt 3pt 4pt 5pt" border="solid 2pt"> + <fo:block>background on column</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + <fo:table table-layout="fixed" width="100%" background-color="red"> + <fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/> + <fo:table-body> + <fo:table-row> + <fo:table-cell id="bg-table" padding="2pt 3pt 4pt 5pt" border="solid 2pt"> + <fo:block>background on table</fo:block> + </fo:table-cell> + <fo:table-cell padding="2pt 3pt 4pt 5pt" border="solid 2pt"> + <fo:block>background on table</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="20400" xpath="//block[@prod-id='bg-row']/preceding-sibling::block[1]/@bpd"/> + <eval expected="178000" xpath="//block[@prod-id='bg-row']/preceding-sibling::block[1]/@ipd"/> + <eval expected="23400" xpath="//block[@prod-id='bg-row']/preceding-sibling::block[1]/@top-offset"/> + <eval expected="1000" xpath="//block[@prod-id='bg-row']/preceding-sibling::block[1]/@left-offset"/> + + <eval expected="20400" xpath="//block[@prod-id='bg-body']/preceding-sibling::block[1]/@bpd"/> + <eval expected="178000" xpath="//block[@prod-id='bg-body']/preceding-sibling::block[1]/@ipd"/> + <eval expected="45800" xpath="//block[@prod-id='bg-body']/preceding-sibling::block[1]/@top-offset"/> + <eval expected="1000" xpath="//block[@prod-id='bg-body']/preceding-sibling::block[1]/@left-offset"/> + + <eval expected="20400" xpath="//block[@prod-id='bg-col']/preceding-sibling::block[1]/@bpd"/> + <eval expected="178000" xpath="//block[@prod-id='bg-col']/preceding-sibling::block[1]/@ipd"/> + <eval expected="1000" xpath="//block[@prod-id='bg-col']/preceding-sibling::block[1]/@top-offset"/> + <eval expected="1000" xpath="//block[@prod-id='bg-col']/preceding-sibling::block[1]/@left-offset"/> + </checks> +</testcase> diff --git a/test/layoutengine/standard-testcases/table_border-collapse_collapse_1.xml b/test/layoutengine/standard-testcases/table_border-collapse_collapse_1.xml deleted file mode 100644 index 052eaa1c9..000000000 --- a/test/layoutengine/standard-testcases/table_border-collapse_collapse_1.xml +++ /dev/null @@ -1,130 +0,0 @@ -<?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 tables with collapse border model. Simple cell borders to start with. - </p> - </info> - <fo> - <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> - <fo:layout-master-set> - <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="20pt"> - <fo:region-body margin="0pt"/> - </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-container height="20pt" background-color="lightgray"> - <fo:block>block before table</fo:block> - </fo:block-container> - <fo:block margin="0pt" border="groove 5pt green" border-right="15pt" height="20pt">normal border here</fo:block> - <fo:block-container margin-left="150pt" width="150pt + 7.5pt" height="5pt" background-color="gray"> - <fo:block/> - </fo:block-container> - <fo:block-container margin-left="150pt + 7.5pt" width="150pt - 7.5pt - 7.5pt" height="5pt" background-color="gray"> - <fo:block/> - </fo:block-container> - <fo:table table-layout="fixed" width="100%" border-collapse="collapse" background-color="rgb(90%, 90%, 100%)"> - <fo:table-column column-width="150pt"/> - <fo:table-column column-width="150pt"/> - <fo:table-body> - <fo:table-row height="50pt"> - <fo:table-cell border="solid 15pt blue"> - <fo:block text-align="justify">cell1 cell1 cell1 cell1 cell1 cell1 cell1</fo:block> - </fo:table-cell> - <fo:table-cell background-color="yellow" border="solid 5pt black" border-right="groove 15pt red" border-top="dotted 5pt black" border-bottom="dotted 5pt green"> - <fo:block text-align="justify">cell2 cell2 cell2 cell2 cell2 cell2 cell2</fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell background-color="orange"> - <fo:block>cell3</fo:block> - </fo:table-cell> - <fo:table-cell border="solid 10pt red" border-top="dotted 5pt red"> - <fo:block>cell4</fo:block> - </fo:table-cell> - </fo:table-row> - </fo:table-body> - </fo:table> - <fo:block background-color="lightgray">block after table</fo:block> - </fo:flow> - </fo:page-sequence> - </fo:root> - </fo> - <checks> - <!-- table dimensions --> - <eval expected="320000" xpath="//flow/block[5]/@ipd"/> - <eval expected="71900" xpath="//flow/block[5]/@bpd"/> - - <!-- cell 1 --> - <true xpath="//flow/block[5]/block[1]/@is-reference-area"/> - <eval expected="7500" xpath="//flow/block[5]/block[1]/@left-offset"/> - <eval expected="7500" xpath="//flow/block[5]/block[1]/@top-offset"/> - <eval expected="135000" xpath="//flow/block[5]/block[1]/@ipd"/> - <eval expected="35000" xpath="//flow/block[5]/block[1]/@bpd"/> - <eval expected="(solid,#0000ff,15000,collapse-outer)" xpath="//flow/block[5]/block[1]/@border-before"/> - <eval expected="(solid,#0000ff,15000,collapse-inner)" xpath="//flow/block[5]/block[1]/@border-after"/> - <eval expected="(solid,#0000ff,15000,collapse-outer)" xpath="//flow/block[5]/block[1]/@border-start"/> - <eval expected="(solid,#0000ff,15000,collapse-inner)" xpath="//flow/block[5]/block[1]/@border-end"/> - <eval expected="135000" xpath="//flow/block[5]/block[1]/block[1]/@ipd"/> - <eval expected="14400" xpath="//flow/block[5]/block[1]/block[1]/@bpd"/> - - <!-- cell 2 --> - <true xpath="//flow/block[5]/block[2]/@is-reference-area"/> - <eval expected="157500" xpath="//flow/block[5]/block[2]/@left-offset"/> - <eval expected="2500" xpath="//flow/block[5]/block[2]/@top-offset"/> - <eval expected="135000" xpath="//flow/block[5]/block[2]/@ipd"/> - <eval expected="40000" xpath="//flow/block[5]/block[2]/@bpd"/> - <eval expected="(dotted,#000000,5000,collapse-outer)" xpath="//flow/block[5]/block[2]/@border-before"/> - <eval expected="(dotted,#00ff00,5000,collapse-inner)" xpath="//flow/block[5]/block[2]/@border-after"/> - <eval expected="(solid,#0000ff,15000,collapse-inner)" xpath="//flow/block[5]/block[2]/@border-start"/> - <eval expected="(groove,#ff0000,15000,collapse-outer)" xpath="//flow/block[5]/block[2]/@border-end"/> - <eval expected="color=#ffff00,repeat=0,horiz=0,vertical=0" xpath="//flow/block[5]/block[2]/@background"/> - <eval expected="135000" xpath="//flow/block[5]/block[2]/block[1]/@ipd"/> - <eval expected="14400" xpath="//flow/block[5]/block[2]/block[1]/@bpd"/> - - <!-- cell 3 --> - <true xpath="//flow/block[5]/block[3]/@is-reference-area"/> - <true xpath="not(boolean(//flow/block[5]/block[3]/@left-offset)) or (//flow/block[5]/block[3]/@left-offset = 0)"/> - <eval expected="57500" xpath="//flow/block[5]/block[3]/@top-offset"/> - <eval expected="145000" xpath="//flow/block[5]/block[3]/@ipd"/> - <eval expected="14400" xpath="//flow/block[5]/block[3]/@bpd"/> - <eval expected="(solid,#0000ff,15000,collapse-inner)" xpath="//flow/block[5]/block[3]/@border-before"/> - <true xpath="not(boolean(//flow/block[5]/block[3]/@border-after))"/> - <true xpath="not(boolean(//flow/block[5]/block[3]/@border-start))"/> - <eval expected="(solid,#ff0000,10000,collapse-inner)" xpath="//flow/block[5]/block[3]/@border-end"/> - <eval expected="color=#ffa500,repeat=0,horiz=0,vertical=0" xpath="//flow/block[5]/block[3]/@background"/> - <eval expected="145000" xpath="//flow/block[5]/block[3]/block[1]/@ipd"/> - <eval expected="14400" xpath="//flow/block[5]/block[3]/block[1]/@bpd"/> - - <!-- cell 4 --> - <true xpath="//flow/block[5]/block[4]/@is-reference-area"/> - <eval expected="155000" xpath="//flow/block[5]/block[4]/@left-offset"/> - <eval expected="52500" xpath="//flow/block[5]/block[4]/@top-offset"/> - <eval expected="140000" xpath="//flow/block[5]/block[4]/@ipd"/> - <eval expected="14400" xpath="//flow/block[5]/block[4]/@bpd"/> - <eval expected="(dotted,#ff0000,5000,collapse-inner)" xpath="//flow/block[5]/block[3]/@border-before"/> - <eval expected="(solid,#ff0000,10000,collapse-outer)" xpath="//flow/block[5]/block[3]/@border-after"/> - <eval expected="(solid,#ff0000,10000,collapse-inner)" xpath="//flow/block[5]/block[3]/@border-start"/> - <eval expected="(solid,#ff0000,10000,collapse-outer)" xpath="//flow/block[5]/block[3]/@border-end"/> - <eval expected="140000" xpath="//flow/block[5]/block[4]/block[1]/@ipd"/> - <eval expected="14400" xpath="//flow/block[5]/block[4]/block[1]/@bpd"/> - </checks> -</testcase> diff --git a/test/layoutengine/standard-testcases/table_border-collapse_collapse_2.xml b/test/layoutengine/standard-testcases/table_border-collapse_collapse_2.xml deleted file mode 100644 index cd2575822..000000000 --- a/test/layoutengine/standard-testcases/table_border-collapse_collapse_2.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?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 tables with collapse border model. Simple cell borders to start with. - </p> - </info> - <fo> - <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg"> - <fo:layout-master-set> - <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="20pt"> - <fo:region-body margin="0pt"/> - </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 background-color="lightgray">block before table</fo:block> - <fo:table table-layout="fixed" width="100%" border-collapse="collapse" padding="5pt"> - <fo:table-column column-width="2in"/> - <fo:table-column column-width="2in"/> - <fo:table-body> - <fo:table-row> - <fo:table-cell border="solid 10pt blue"> - <fo:block>cell1</fo:block> - </fo:table-cell> - <fo:table-cell background-color="yellow" border="solid 5pt black"> - <fo:block>cell2</fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row> - <fo:table-cell background-color="orange" border="dotted 15pt black" number-columns-spanned="2"> - <fo:block>spanned</fo:block> - </fo:table-cell> - </fo:table-row> - <fo:table-row border="solid 15pt green"> - <fo:table-cell> - <fo:block>cell4</fo:block> - </fo:table-cell> - <fo:table-cell background-color="yellow"> - <fo:block>cell5</fo:block> - </fo:table-cell> - </fo:table-row> - </fo:table-body> - </fo:table> - <fo:block background-color="lightgray">block after table</fo:block> - </fo:flow> - </fo:page-sequence> - </fo:root> - </fo> - <checks> - <eval expected="add checks here" xpath="false"/> - </checks> -</testcase> diff --git a/test/layoutengine/standard-testcases/table_border-collapse_separate_1.xml b/test/layoutengine/standard-testcases/table_border-collapse_separate_1.xml index d0b11c1b0..8a9370a5c 100644 --- a/test/layoutengine/standard-testcases/table_border-collapse_separate_1.xml +++ b/test/layoutengine/standard-testcases/table_border-collapse_separate_1.xml @@ -31,7 +31,7 @@ </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" border-collapse="separate"> + <fo:table table-layout="fixed" width="100%" border-collapse="separate"> <fo:table-column column-width="160pt"/> <fo:table-column column-width="200pt"/> <fo:table-body> diff --git a/test/layoutengine/standard-testcases/table_border_padding.xml b/test/layoutengine/standard-testcases/table_border_padding.xml index 7099d5dd1..385242903 100644 --- a/test/layoutengine/standard-testcases/table_border_padding.xml +++ b/test/layoutengine/standard-testcases/table_border_padding.xml @@ -66,8 +66,8 @@ </fo> <checks> <!-- table dimensions --> - <eval expected="308000" xpath="//flow/block[2]/@ipda"/> - <eval expected="288000" xpath="//flow/block[2]/@ipd"/> + <eval expected="328000" xpath="//flow/block[2]/@ipda"/> + <eval expected="308000" xpath="//flow/block[2]/@ipd"/> <eval expected="48800" xpath="//flow/block[2]/@bpda"/> <eval expected="28800" xpath="//flow/block[2]/@bpd"/> <eval expected="10000 10000 10000 10000" xpath="//flow/block[2]/@bap"/> @@ -95,7 +95,7 @@ <eval expected="144000" xpath="//flow/block[2]/block[2]/block[1]/@ipd"/> <eval expected="14400" xpath="//flow/block[2]/block[2]/block[1]/@bpd"/> <eval expected="cell2" xpath="//flow/block[2]/block[2]/block[1]/lineArea"/> - <eval expected="color=#ffff00,repeat=0,horiz=0,vertical=0" xpath="//flow/block[2]/block[2]/@background"/> + <eval expected="color=#ffff00" xpath="//flow/block[2]/block[2]/@background"/> <!-- cell 3 --> <true xpath="//flow/block[2]/block[3]/@is-reference-area"/> @@ -106,7 +106,7 @@ <eval expected="144000" xpath="//flow/block[2]/block[3]/block[1]/@ipd"/> <eval expected="14400" xpath="//flow/block[2]/block[3]/block[1]/@bpd"/> <eval expected="cell3" xpath="//flow/block[2]/block[3]/block[1]/lineArea"/> - <eval expected="color=#ffa500,repeat=0,horiz=0,vertical=0" xpath="//flow/block[2]/block[3]/@background"/> + <eval expected="color=#ffa500" xpath="//flow/block[2]/block[3]/@background"/> <!-- cell 4 --> <true xpath="//flow/block[2]/block[4]/@is-reference-area"/> @@ -121,19 +121,27 @@ <element-list category="breaker"> <box w="14400"/> <penalty w="0" p="0"/> - <box w="10000" aux="true"/> + <box w="0" aux="true"/> + <penalty w="0" p="INF" aux="true"/> + <glue w="10000" y="0" z="0" aux="true"/> <box w="14400"/> - <penalty w="20000" p="0"/> + <penalty w="0" p="0"/> <box w="14400"/> - <box w="10000" aux="true"/> + <penalty w="0" p="INF" aux="true"/> + <glue w="10000" y="0" z="0" aux="true"/> <penalty w="0" p="0"/> <box w="14400"/> <penalty w="0" p="0"/> - <box w="10000" aux="true"/> + <box w="0" aux="true"/> + <penalty w="0" p="INF" aux="true"/> + <glue w="10000" y="0" z="0" aux="true"/> <box w="14400"/> - <box w="10000" aux="true"/> + <box w="0" aux="true"/> + <penalty w="0" p="INF" aux="true"/> + <glue w="10000" y="0" z="0" aux="true"/> + <box w="0" aux="true"/> <skip>3</skip> </element-list> - + </checks> </testcase> diff --git a/test/layoutengine/standard-testcases/table_bug44621.xml b/test/layoutengine/standard-testcases/table_bug44621.xml new file mode 100644 index 000000000..b4b9edbd0 --- /dev/null +++ b/test/layoutengine/standard-testcases/table_bug44621.xml @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- $Id$ --> +<testcase> + <info> + <p> + This is a testcase for bug #44621: when the width of the after border of a cell, in the + trailing case, is bigger than in the normal case, a wrong sequence of Knuth elements was + generated, leading to some content being swallowed. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" page-height="4in" page-width="5in" margin="0.5in"> + <fo:region-body background-color="#F0F0F0"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page" font-size="12pt"> + <fo:flow flow-name="xsl-region-body"> + <fo:block space-after="10pt">The after borders of the body’s cells, in the trailing case, + are thicker than in the normal case.</fo:block> + <fo:table width="100%" table-layout="fixed" + font-size="8pt" line-height="10pt"> + <fo:table-column column-width="proportional-column-width(1)" + number-columns-repeated="2"/> + <fo:table-footer> + <fo:table-cell border="4pt solid blue"> + <fo:block>Footer 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="4pt solid blue"> + <fo:block>Footer 1.2</fo:block> + </fo:table-cell> + </fo:table-footer> + <fo:table-body> + <fo:table-row> + <fo:table-cell border="2pt solid black"> + <fo:block>Cell 1.1</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid black"> + <fo:block>Cell 1.2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row> + <fo:table-cell border="2pt solid black"> + <fo:block>Cell 2.1</fo:block> + </fo:table-cell> + <fo:table-cell border="2pt solid black"> + <fo:block>Cell 2.2</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + + <eval expected="39000" xpath="//pageViewport//flow/block[2]/@bpd"/> + <eval expected="39000" xpath="//pageViewport//flow/block[2]/@bpda"/> + <!-- cell 1.1 --> + <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[1]/@bpd"/> + <eval expected="14000" xpath="//pageViewport//flow/block[2]/block[1]/@bpda"/> + <!-- cell 1.2 --> + <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[2]/@bpd"/> + <eval expected="14000" xpath="//pageViewport//flow/block[2]/block[2]/@bpda"/> + <!-- cell 2.1 --> + <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[3]/@bpd"/> + <eval expected="16000" xpath="//pageViewport//flow/block[2]/block[3]/@bpda"/> + <!-- cell 2.2 --> + <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[4]/@bpd"/> + <eval expected="16000" xpath="//pageViewport//flow/block[2]/block[4]/@bpda"/> + <!-- footer 1.1 --> + <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[5]/@bpd"/> + <eval expected="18000" xpath="//pageViewport//flow/block[2]/block[5]/@bpda"/> + <!-- footer 1.2 --> + <eval expected="10000" xpath="//pageViewport//flow/block[2]/block[6]/@bpd"/> + <eval expected="18000" xpath="//pageViewport//flow/block[2]/block[6]/@bpda"/> + + <element-list category="breaker"> + <skip>4</skip> + <box w="12000"/> + <penalty w="14000" p="0"/><!-- should be 15000 --> + <box w="13000"/> + <box w="14000"/> + <skip>3</skip> + </element-list> + </checks> +</testcase> diff --git a/test/layoutengine/standard-testcases/table_row-delay_fixed-row-height.xml b/test/layoutengine/standard-testcases/table_row-delay_fixed-row-height.xml index 70990de62..0c6ed10eb 100644 --- a/test/layoutengine/standard-testcases/table_row-delay_fixed-row-height.xml +++ b/test/layoutengine/standard-testcases/table_row-delay_fixed-row-height.xml @@ -144,9 +144,9 @@ <element-list category="breaker"> <skip>3</skip> - <box w="200"/> - <penalty w="34800" p="INF"/> - <box w="33600"/> + <box w="17000"/> + <penalty w="15000" p="0"/> + <box w="16800"/> <penalty w="1800" p="0"/> <box w="31200"/> <penalty w="8000" p="0"/> diff --git a/test/layoutengine/standard-testcases/table_row-height_break.xml b/test/layoutengine/standard-testcases/table_row-height_break.xml new file mode 100644 index 000000000..b6c7d8d37 --- /dev/null +++ b/test/layoutengine/standard-testcases/table_row-height_break.xml @@ -0,0 +1,87 @@ +<?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 a forced break is still taken into account when the minimal height of a + row is not reached yet. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="page" page-height="4in" page-width="5in" margin="0.5in"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="page"> + <fo:flow flow-name="xsl-region-body"> + <fo:block>The first row of the following table has a fixed height, and a forced break + occurs before this height is reached.</fo:block> + <fo:table width="100%" table-layout="fixed" + border-collapse="separate" border="4pt solid black"> + <fo:table-body> + <fo:table-row block-progression-dimension.minimum="40pt"> + <fo:table-cell border="4pt solid red"> + <fo:block>Cell 1</fo:block> + <fo:block break-before="page">Should be on a new page</fo:block> + </fo:table-cell> + <fo:table-cell border="4pt solid blue"> + <fo:block>Cell 2</fo:block> + </fo:table-cell> + </fo:table-row> + <fo:table-row block-progression-dimension.minimum="50pt"> + <fo:table-cell border="4pt solid blue"> + <fo:block>Cell 3</fo:block> + </fo:table-cell> + <fo:table-cell border="4pt solid blue"> + <fo:block>Cell 4</fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- page 1 --> + <eval expected="44000" xpath="//pageViewport[1]//flow/block[2]/@bpd"/> + <eval expected="48000" xpath="//pageViewport[1]//flow/block[2]/@bpda"/> + <eval expected="40000" xpath="//pageViewport[1]//flow/block[2]/block[1]/@bpd"/> + <eval expected="44000" xpath="//pageViewport[1]//flow/block[2]/block[1]/@bpda"/> + <eval expected="Cell 1" xpath="//pageViewport[1]//flow/block[2]/block[1]//text"/> + <eval expected="40000" xpath="//pageViewport[1]//flow/block[2]/block[2]/@bpd"/> + <eval expected="44000" xpath="//pageViewport[1]//flow/block[2]/block[2]/@bpda"/> + <eval expected="Cell 2" xpath="//pageViewport[1]//flow/block[2]/block[2]//text"/> + <!-- page 2 --> + <eval expected="90800" xpath="//pageViewport[2]//flow/block[1]/@bpd"/> + <eval expected="94800" xpath="//pageViewport[2]//flow/block[1]/@bpda"/> + <eval expected="28800" xpath="//pageViewport[2]//flow/block[1]/block[1]/@bpd"/> + <eval expected="32800" xpath="//pageViewport[2]//flow/block[1]/block[1]/@bpda"/> + <eval expected="Should be on a new" xpath="//pageViewport[2]//flow/block[1]/block[1]//text"/> + <eval expected="28800" xpath="//pageViewport[2]//flow/block[1]/block[2]/@bpd"/> + <eval expected="32800" xpath="//pageViewport[2]//flow/block[1]/block[2]/@bpda"/> + <eval expected="" xpath="//pageViewport[2]//flow/block[1]/block[2]//text"/> + <eval expected="50000" xpath="//pageViewport[2]//flow/block[1]/block[3]/@bpd"/> + <eval expected="58000" xpath="//pageViewport[2]//flow/block[1]/block[3]/@bpda"/> + <eval expected="50000" xpath="//pageViewport[2]//flow/block[1]/block[4]/@bpd"/> + <eval expected="58000" xpath="//pageViewport[2]//flow/block[1]/block[4]/@bpda"/> + </checks> +</testcase> |