diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-09-05 08:09:42 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-09-05 08:09:42 +0000 |
commit | 299c6b1393cf9d5194929ac8c756171b2ff2ce4f (patch) | |
tree | a03a028f1ef7f339b938f6af08a2a51391e3216a /test | |
parent | 2daa1220f0331d560481ed48d5531ee1b6555793 (diff) | |
download | xmlgraphics-fop-299c6b1393cf9d5194929ac8c756171b2ff2ce4f.tar.gz xmlgraphics-fop-299c6b1393cf9d5194929ac8c756171b2ff2ce4f.zip |
Bugzilla #36487:
Background images were incorrectly positioned in some absolute positioned blocks.
Some additional attributes output by the XMLRenderer.
Refactored the layout for e-g and i-f-o. Introduced common base classes for the
corresponding flow objects as well as the e-g and i-f-o LMs.
Fixed incorrectly applied margins on region-body when writing mode is not lr.
Fixed application of correct percent base for margins and extents on regions
when the reference orientation is 90 degrees.
Fixed incorrectly positioned regions when writing mode is different between the
simple-page-master setting and the setting on the region.
Several updates to the layout engine test cases.
Submitted by: Manuel Mall <mm.at.arcus.com.au>
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@278690 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
19 files changed, 1270 insertions, 65 deletions
diff --git a/test/layoutengine/disabled-testcases.txt b/test/layoutengine/disabled-testcases.txt index f782b308d..0f2397b8b 100644 --- a/test/layoutengine/disabled-testcases.txt +++ b/test/layoutengine/disabled-testcases.txt @@ -4,11 +4,12 @@ block_font-stretch.xml block_space-before_space-after_2.xml block_word-spacing.xml block_word-spacing_text-align_justify.xml -external-graphic_content-height_content-width.xml external-graphic_oversized.xml inline-block_keep-together.xml inline_block_nested_3.xml +inline_border_padding.xml inline-container_block_nested.xml +inline-container_border_padding.xml inline_letter-spacing.xml inline_word-spacing.xml inline_word-spacing_text-align_justify.xml @@ -24,7 +25,6 @@ page-number-citation_complex_2.xml page-number_initial-page-number_2.xml region-body_column-count_footnote.xml region-body_column-count_#36356.xml -region-body_margin_relative_writing-mode_rl-tb.xml table-body_background-image.xml table_border-collapse_collapse_1.xml table_border-collapse_collapse_2.xml diff --git a/test/layoutengine/testcases/block-container_background-image_background-position-relative.xml b/test/layoutengine/testcases/block-container_background-image_background-position-relative.xml index 74b000f95..ea09a97d6 100644 --- a/test/layoutengine/testcases/block-container_background-image_background-position-relative.xml +++ b/test/layoutengine/testcases/block-container_background-image_background-position-relative.xml @@ -27,64 +27,64 @@ <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" margin="15pt"> + <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in" margin="0pt"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> - <fo:block-container margin="0pt" padding="5pt" left="0in" top="0in" width="1.5in" height="1in" absolute-position="absolute" background-color="blue" + <fo:block-container margin="0pt" padding="5pt 10pt 20pt 15pt" left="0in" top="0in" width="90pt" height="70pt" absolute-position="absolute" background-color="blue" background-image="##img" background-position-horizontal="right" background-repeat="no-repeat"> <fo:block>image in top right corner</fo:block> </fo:block-container> - <fo:block-container margin="0pt" padding="5pt" left="1.75in" top="0in" width="1.5in" height="1in" absolute-position="absolute" background-color="green" + <fo:block-container margin="0pt" padding="5pt 10pt 20pt 15pt" left="120pt" top="0in" width="90pt" height="70pt" absolute-position="absolute" background-color="green" background-image="##img" background-position-horizontal="right" background-position-vertical="center" background-repeat="no-repeat"> <fo:block>image in center right</fo:block> </fo:block-container> - <fo:block-container margin="0pt" padding="5pt" left="3.5in" top="0in" width="1.5in" height="1in" absolute-position="absolute" background-color="yellow" + <fo:block-container margin="0pt" padding="5pt 10pt 20pt 15pt" left="240pt" top="0in" width="90pt" height="70pt" absolute-position="absolute" background-color="yellow" background-image="##img" background-position-horizontal="right" background-position-vertical="bottom" background-repeat="no-repeat"> <fo:block>image in bottom right corner</fo:block> </fo:block-container> - <fo:block-container margin="0pt" padding="5pt" left="0in" top="1.25in" width="1.5in" height="1in" absolute-position="absolute" background-color="yellow" + <fo:block-container margin="0pt" padding="5pt 10pt 20pt 15pt" left="0in" top="100pt" width="90pt" height="70pt" absolute-position="absolute" background-color="yellow" background-image="##img" background-position-horizontal="center" background-repeat="no-repeat"> <fo:block>image in top center</fo:block> </fo:block-container> - <fo:block-container margin="0pt" padding="5pt" left="1.75in" top="1.25in" width="1.5in" height="1in" absolute-position="absolute" background-color="blue" + <fo:block-container margin="0pt" padding="5pt 10pt 20pt 15pt" left="120pt" top="100pt" width="90pt" height="70pt" absolute-position="absolute" background-color="blue" background-image="##img" background-position-horizontal="center" background-position-vertical="center" background-repeat="no-repeat"> <fo:block>image in center</fo:block> </fo:block-container> - <fo:block-container margin="0pt" padding="5pt" left="3.5in" top="1.25in" width="1.5in" height="1in" absolute-position="absolute" background-color="green" + <fo:block-container margin="0pt" padding="5pt 10pt 20pt 15pt" left="240pt" top="100pt" width="90pt" height="70pt" absolute-position="absolute" background-color="green" background-image="##img" background-position-horizontal="center" background-position-vertical="bottom" background-repeat="no-repeat"> <fo:block>image in bottom center</fo:block> </fo:block-container> - <fo:block-container margin="0pt" padding="5pt" left="0in" top="2.5in" width="1.5in" height="1in" absolute-position="absolute" background-color="green" + <fo:block-container margin="0pt" padding="5pt 10pt 20pt 15pt" left="0in" top="200pt" width="90pt" height="70pt" absolute-position="absolute" background-color="green" background-image="##img" background-repeat="no-repeat"> <fo:block>image in top left</fo:block> </fo:block-container> - <fo:block-container margin="0pt" padding="5pt" left="1.75in" top="2.5in" width="1.5in" height="1in" absolute-position="absolute" background-color="yellow" + <fo:block-container margin="0pt" padding="5pt 10pt 20pt 15pt" left="120pt" top="200pt" width="90pt" height="70pt" absolute-position="absolute" background-color="yellow" background-image="##img" background-position-vertical="center" background-repeat="no-repeat"> <fo:block>image in center left</fo:block> </fo:block-container> - <fo:block-container margin="0pt" padding="5pt" left="3.5in" top="2.5in" width="1.5in" height="1in" absolute-position="absolute" background-color="blue" + <fo:block-container margin="0pt" padding="5pt 10pt 20pt 15pt" left="240pt" top="200pt" width="90pt" height="70pt" absolute-position="absolute" background-color="blue" background-image="##img" background-position-vertical="bottom" background-repeat="no-repeat"> @@ -96,22 +96,22 @@ </fo> <checks> <!-- first container in row 1 --> - <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=77991,vertical=0" xpath="//flow/block[1]/@background"/> + <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=74991,vertical=0" xpath="//flow/block[1]/@background"/> <!-- second container in row 1 --> - <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=77991,vertical=20995" xpath="//flow/block[2]/@background"/> + <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=74991,vertical=27495" xpath="//flow/block[2]/@background"/> <!-- third container in row 1 --> - <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=77991,vertical=41991" xpath="//flow/block[3]/@background"/> + <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=74991,vertical=54991" xpath="//flow/block[3]/@background"/> <!-- first container in row 2 --> - <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=38995,vertical=0" xpath="//flow/block[4]/@background"/> + <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=37495,vertical=0" xpath="//flow/block[4]/@background"/> <!-- second container in row 2 --> - <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=38995,vertical=20995" xpath="//flow/block[5]/@background"/> + <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=37495,vertical=27495" xpath="//flow/block[5]/@background"/> <!-- third container in row 2 --> - <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=38995,vertical=41991" xpath="//flow/block[6]/@background"/> + <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=37495,vertical=54991" xpath="//flow/block[6]/@background"/> <!-- first container in row 3 --> <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=0" xpath="//flow/block[7]/@background"/> <!-- second container in row 3 --> - <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=20995" xpath="//flow/block[8]/@background"/> + <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=27495" xpath="//flow/block[8]/@background"/> <!-- third container in row 3 --> - <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=41991" xpath="//flow/block[9]/@background"/> + <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=54991" xpath="//flow/block[9]/@background"/> </checks> </testcase> diff --git a/test/layoutengine/testcases/external-graphic_basic.xml b/test/layoutengine/testcases/external-graphic_basic.xml index 736ade4b7..a4ea4a45a 100644 --- a/test/layoutengine/testcases/external-graphic_basic.xml +++ b/test/layoutengine/testcases/external-graphic_basic.xml @@ -31,7 +31,7 @@ <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:block>plain external-graphic</fo:block> - <fo:block> + <fo:block background-color="orange"> <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg"/>EOG </fo:block> <fo:block>EOF</fo:block> diff --git a/test/layoutengine/testcases/external-graphic_border_padding.xml b/test/layoutengine/testcases/external-graphic_border_padding.xml index f8bfa4d79..43ff49649 100644 --- a/test/layoutengine/testcases/external-graphic_border_padding.xml +++ b/test/layoutengine/testcases/external-graphic_border_padding.xml @@ -31,23 +31,51 @@ <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:block background-color="orange"> - <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" border="solid 5pt" padding="5pt" background-color="white"/> + <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" border-style="solid" border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" background-color="white"/> Normal font + </fo:block> + <fo:block background-color="yellow" font-size="140pt"> + <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" border-style="solid" border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" background-color="white"/> FO + </fo:block> + <fo:block font-size="9pt"> + In both blocks we have a setting of border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" on the e-g. + In the first block the e-g determines the height of the line in the 2nd block the font is bigger than the e-g. </fo:block> - <fo:block>EOF</fo:block> </fo:flow> </fo:page-sequence> </fo:root> </fo> <checks> - <eval expected="10000 10000 10000 10000" xpath="//flow/block[1]/lineArea/viewport/@bap"/> + <!-- first e-g --> + <eval expected="46080" xpath="//flow/block[1]/lineArea/viewport/@ipd"/> + <eval expected="46080" xpath="//flow/block[1]/lineArea/viewport/@bpd"/> + <eval expected="96080" xpath="//flow/block[1]/lineArea/viewport/@bpda"/> + <eval expected="1650" xpath="//flow/block[1]/lineArea/viewport/@offset"/> + <eval expected="20000 30000 20000 30000" xpath="//flow/block[1]/lineArea/viewport/@bap"/> <eval expected="color=#ffffff" xpath="//flow/block[1]/lineArea/viewport/@background"/> <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/> - <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/> - <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/> - <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/> - <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/> - <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/> + <eval expected="(solid,#000000,20000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/> + <eval expected="(solid,#000000,15000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/> + <eval expected="(solid,#000000,10000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/> + <eval expected="15000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/> + <eval expected="10000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/> <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-start"/> - <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/> + <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/> + <eval expected="20000 20000 46080 46080" xpath="//flow/block[1]/lineArea/viewport/image/@pos"/> + <!-- second e-g --> + <eval expected="46080" xpath="//flow/block[2]/lineArea/viewport/@ipd"/> + <eval expected="46080" xpath="//flow/block[2]/lineArea/viewport/@bpd"/> + <eval expected="96080" xpath="//flow/block[2]/lineArea/viewport/@bpda"/> + <eval expected="23690" xpath="//flow/block[2]/lineArea/viewport/@offset"/> + <eval expected="20000 30000 20000 30000" xpath="//flow/block[2]/lineArea/viewport/@bap"/> + <eval expected="color=#ffffff" xpath="//flow/block[2]/lineArea/viewport/@background"/> + <eval expected="(solid,#000000,5000)" xpath="//flow/block[2]/lineArea/viewport/@border-before"/> + <eval expected="(solid,#000000,20000)" xpath="//flow/block[2]/lineArea/viewport/@border-after"/> + <eval expected="(solid,#000000,15000)" xpath="//flow/block[2]/lineArea/viewport/@border-start"/> + <eval expected="(solid,#000000,10000)" xpath="//flow/block[2]/lineArea/viewport/@border-end"/> + <eval expected="15000" xpath="//flow/block[2]/lineArea/viewport/@padding-before"/> + <eval expected="10000" xpath="//flow/block[2]/lineArea/viewport/@padding-after"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea/viewport/@padding-start"/> + <eval expected="20000" xpath="//flow/block[2]/lineArea/viewport/@padding-end"/> + <eval expected="20000 20000 46080 46080" xpath="//flow/block[2]/lineArea/viewport/image/@pos"/> </checks> </testcase> diff --git a/test/layoutengine/testcases/external-graphic_display-align.xml b/test/layoutengine/testcases/external-graphic_display-align.xml index e828e3a77..76d74b791 100644 --- a/test/layoutengine/testcases/external-graphic_display-align.xml +++ b/test/layoutengine/testcases/external-graphic_display-align.xml @@ -32,23 +32,23 @@ <fo:flow flow-name="xsl-region-body"> <fo:block>plain external-graphic</fo:block> <fo:block> - <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" block-progression-dimension="60pt"/>EOG + <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" block-progression-dimension="60pt" background-color="yellow"/>EOG </fo:block> <fo:block>external-graphic with display-align="auto"</fo:block> <fo:block> - <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" display-align="auto" block-progression-dimension="60pt"/>EOG + <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" display-align="auto" block-progression-dimension="60pt" background-color="yellow"/>EOG </fo:block> <fo:block>external-graphic with display-align="before"</fo:block> <fo:block> - <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" display-align="before" block-progression-dimension="60pt"/>EOG + <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" display-align="before" block-progression-dimension="60pt" background-color="yellow"/>EOG </fo:block> <fo:block>external-graphic with display-align="center"</fo:block> <fo:block> - <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" display-align="center" block-progression-dimension="60pt"/>EOG + <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" display-align="center" block-progression-dimension="60pt" background-color="yellow"/>EOG </fo:block> <fo:block>external-graphic with display-align="after"</fo:block> <fo:block> - <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" display-align="after" block-progression-dimension="60pt"/>EOG + <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" display-align="after" block-progression-dimension="60pt" background-color="yellow"/>EOG </fo:block> <fo:block>EOF</fo:block> </fo:flow> diff --git a/test/layoutengine/testcases/inline-container_border_padding.xml b/test/layoutengine/testcases/inline-container_border_padding.xml new file mode 100644 index 000000000..10ab7b646 --- /dev/null +++ b/test/layoutengine/testcases/inline-container_border_padding.xml @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 the borders and the like for instream-foreign-object. + </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"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:flow flow-name="xsl-region-body"> + <fo:block background-color="orange"> + Before <fo:inline-container border-style="solid" border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" background-color="white"> + <fo:block>inside the container</fo:block> + </fo:inline-container> after + </fo:block> + <fo:block background-color="yellow" font-size="100pt"> + BC <fo:inline-container border-style="solid" border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" background-color="white"> + <fo:block font-size="12pt">inside the container</fo:block> + </fo:inline-container> AC + </fo:block> + <fo:block font-size="9pt"> + In both blocks we have a setting of border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" on the i-f-o. + In the first block the i-f-o determines the height of the line in the 2nd block the font is bigger than the i-f-o. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- first e-g --> + <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@ipd"/> + <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@bpd"/> + <eval expected="70000" xpath="//flow/block[1]/lineArea/viewport/@bpda"/> + <eval expected="1650" xpath="//flow/block[1]/lineArea/viewport/@offset"/> + <eval expected="20000 30000 20000 30000" xpath="//flow/block[1]/lineArea/viewport/@bap"/> + <eval expected="color=#ffffff" xpath="//flow/block[1]/lineArea/viewport/@background"/> + <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/> + <eval expected="(solid,#000000,20000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/> + <eval expected="(solid,#000000,15000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/> + <eval expected="(solid,#000000,10000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/> + <eval expected="15000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/> + <eval expected="10000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/> + <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-start"/> + <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/> + <eval expected="20000 20000 20000 20000" xpath="//flow/block[1]/lineArea/viewport/foreignObject/@pos"/> + <!-- second e-g --> + <eval expected="20000" xpath="//flow/block[2]/lineArea/viewport/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/lineArea/viewport/@bpd"/> + <eval expected="70000" xpath="//flow/block[2]/lineArea/viewport/@bpda"/> + <eval expected="15550" xpath="//flow/block[2]/lineArea/viewport/@offset"/> + <eval expected="20000 30000 20000 30000" xpath="//flow/block[2]/lineArea/viewport/@bap"/> + <eval expected="color=#ffffff" xpath="//flow/block[2]/lineArea/viewport/@background"/> + <eval expected="(solid,#000000,5000)" xpath="//flow/block[2]/lineArea/viewport/@border-before"/> + <eval expected="(solid,#000000,20000)" xpath="//flow/block[2]/lineArea/viewport/@border-after"/> + <eval expected="(solid,#000000,15000)" xpath="//flow/block[2]/lineArea/viewport/@border-start"/> + <eval expected="(solid,#000000,10000)" xpath="//flow/block[2]/lineArea/viewport/@border-end"/> + <eval expected="15000" xpath="//flow/block[2]/lineArea/viewport/@padding-before"/> + <eval expected="10000" xpath="//flow/block[2]/lineArea/viewport/@padding-after"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea/viewport/@padding-start"/> + <eval expected="20000" xpath="//flow/block[2]/lineArea/viewport/@padding-end"/> + <eval expected="20000 20000 20000 20000" xpath="//flow/block[2]/lineArea/viewport/foreignObject/@pos"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/inline_border_padding.xml b/test/layoutengine/testcases/inline_border_padding.xml new file mode 100644 index 000000000..474191416 --- /dev/null +++ b/test/layoutengine/testcases/inline_border_padding.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 inlines with border and padding properties. + </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"> + <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" font-size="10pt"> + <fo:block background-color="yellow" margin="0pt"> + Start of file + </fo:block> + <fo:block background-color="silver" margin="0pt"> + Normal text <fo:inline border="solid 5pt red" padding="5pt" background-color="white">inline with border="solid 5pt red" padding="5pt"</fo:inline> normal finish + </fo:block> + <fo:block background-color="yellow" margin="0pt"> + End of file + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/instream-foreign-object_border_padding.xml b/test/layoutengine/testcases/instream-foreign-object_border_padding.xml index 3a1460ea1..51c1ffa0a 100644 --- a/test/layoutengine/testcases/instream-foreign-object_border_padding.xml +++ b/test/layoutengine/testcases/instream-foreign-object_border_padding.xml @@ -31,29 +31,65 @@ <fo:page-sequence master-reference="normal" white-space-collapse="true"> <fo:flow flow-name="xsl-region-body"> <fo:block background-color="orange"> - <fo:instream-foreign-object content-width="20pt" content-height="20pt" border="solid 5pt" padding="5pt" background-color="white"> + <fo:instream-foreign-object content-width="20pt" content-height="20pt" border-style="solid" border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" background-color="white"> <svg:svg viewBox="0 0 20 20"> <svg:g style="fill:red; stroke:#000000"> <svg:rect x="0" y="0" width="15" height="15"/> <svg:rect x="5" y="5" width="15" height="15"/> </svg:g> </svg:svg> - </fo:instream-foreign-object> + </fo:instream-foreign-object> Normal font + </fo:block> + <fo:block background-color="yellow" font-size="100pt"> + <fo:instream-foreign-object content-width="20pt" content-height="20pt" border-style="solid" border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" background-color="white"> + <svg:svg viewBox="0 0 20 20"> + <svg:g style="fill:red; stroke:#000000"> + <svg:rect x="0" y="0" width="15" height="15"/> + <svg:rect x="5" y="5" width="15" height="15"/> + </svg:g> + </svg:svg> + </fo:instream-foreign-object> FOP + </fo:block> + <fo:block font-size="9pt"> + In both blocks we have a setting of border-width="5pt 10pt 20pt 15pt" padding="15pt 20pt 10pt 5pt" on the i-f-o. + In the first block the i-f-o determines the height of the line in the 2nd block the font is bigger than the i-f-o. </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </fo> <checks> - <eval expected="10000 10000 10000 10000" xpath="//flow/block[1]/lineArea/viewport/@bap"/> + <!-- first i-f-o --> + <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@ipd"/> + <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@bpd"/> + <eval expected="70000" xpath="//flow/block[1]/lineArea/viewport/@bpda"/> + <eval expected="1650" xpath="//flow/block[1]/lineArea/viewport/@offset"/> + <eval expected="20000 30000 20000 30000" xpath="//flow/block[1]/lineArea/viewport/@bap"/> <eval expected="color=#ffffff" xpath="//flow/block[1]/lineArea/viewport/@background"/> <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-before"/> - <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/> - <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/> - <eval expected="(solid,#000000,5000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/> - <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/> - <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/> + <eval expected="(solid,#000000,20000)" xpath="//flow/block[1]/lineArea/viewport/@border-after"/> + <eval expected="(solid,#000000,15000)" xpath="//flow/block[1]/lineArea/viewport/@border-start"/> + <eval expected="(solid,#000000,10000)" xpath="//flow/block[1]/lineArea/viewport/@border-end"/> + <eval expected="15000" xpath="//flow/block[1]/lineArea/viewport/@padding-before"/> + <eval expected="10000" xpath="//flow/block[1]/lineArea/viewport/@padding-after"/> <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-start"/> - <eval expected="5000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/> + <eval expected="20000" xpath="//flow/block[1]/lineArea/viewport/@padding-end"/> + <eval expected="20000 20000 20000 20000" xpath="//flow/block[1]/lineArea/viewport/foreignObject/@pos"/> + <!-- second i-f-o --> + <eval expected="20000" xpath="//flow/block[2]/lineArea/viewport/@ipd"/> + <eval expected="20000" xpath="//flow/block[2]/lineArea/viewport/@bpd"/> + <eval expected="70000" xpath="//flow/block[2]/lineArea/viewport/@bpda"/> + <eval expected="15550" xpath="//flow/block[2]/lineArea/viewport/@offset"/> + <eval expected="20000 30000 20000 30000" xpath="//flow/block[2]/lineArea/viewport/@bap"/> + <eval expected="color=#ffffff" xpath="//flow/block[2]/lineArea/viewport/@background"/> + <eval expected="(solid,#000000,5000)" xpath="//flow/block[2]/lineArea/viewport/@border-before"/> + <eval expected="(solid,#000000,20000)" xpath="//flow/block[2]/lineArea/viewport/@border-after"/> + <eval expected="(solid,#000000,15000)" xpath="//flow/block[2]/lineArea/viewport/@border-start"/> + <eval expected="(solid,#000000,10000)" xpath="//flow/block[2]/lineArea/viewport/@border-end"/> + <eval expected="15000" xpath="//flow/block[2]/lineArea/viewport/@padding-before"/> + <eval expected="10000" xpath="//flow/block[2]/lineArea/viewport/@padding-after"/> + <eval expected="5000" xpath="//flow/block[2]/lineArea/viewport/@padding-start"/> + <eval expected="20000" xpath="//flow/block[2]/lineArea/viewport/@padding-end"/> + <eval expected="20000 20000 20000 20000" xpath="//flow/block[2]/lineArea/viewport/foreignObject/@pos"/> </checks> </testcase> diff --git a/test/layoutengine/testcases/instream-foreign-object_display-align.xml b/test/layoutengine/testcases/instream-foreign-object_display-align.xml index 01ecfd5b4..a113ccc54 100644 --- a/test/layoutengine/testcases/instream-foreign-object_display-align.xml +++ b/test/layoutengine/testcases/instream-foreign-object_display-align.xml @@ -32,7 +32,7 @@ <fo:flow flow-name="xsl-region-body"> <fo:block>plain instream-foreign-object</fo:block> <fo:block> - <fo:instream-foreign-object content-width="20pt" content-height="20pt" block-progression-dimension="30pt"> + <fo:instream-foreign-object content-width="20pt" content-height="20pt" block-progression-dimension="30pt" background-color="yellow"> <svg:svg viewBox="0 0 20 20"> <svg:g style="fill:red; stroke:#000000"> <svg:rect x="0" y="0" width="15" height="15"/> @@ -43,7 +43,7 @@ </fo:block> <fo:block>instream-foreign-object with display-align="auto"</fo:block> <fo:block> - <fo:instream-foreign-object content-width="20pt" content-height="20pt" display-align="auto" block-progression-dimension="30pt"> + <fo:instream-foreign-object content-width="20pt" content-height="20pt" display-align="auto" block-progression-dimension="30pt" background-color="yellow"> <svg:svg viewBox="0 0 20 20"> <svg:g style="fill:red; stroke:#000000"> <svg:rect x="0" y="0" width="15" height="15"/> @@ -54,7 +54,7 @@ </fo:block> <fo:block>instream-foreign-object with display-align="before"</fo:block> <fo:block> - <fo:instream-foreign-object content-width="20pt" content-height="20pt" display-align="before" block-progression-dimension="30pt"> + <fo:instream-foreign-object content-width="20pt" content-height="20pt" display-align="before" block-progression-dimension="30pt" background-color="yellow"> <svg:svg viewBox="0 0 20 20"> <svg:g style="fill:red; stroke:#000000"> <svg:rect x="0" y="0" width="15" height="15"/> @@ -65,7 +65,7 @@ </fo:block> <fo:block>instream-foreign-object with display-align="center"</fo:block> <fo:block> - <fo:instream-foreign-object content-width="20pt" content-height="20pt" display-align="center" block-progression-dimension="30pt"> + <fo:instream-foreign-object content-width="20pt" content-height="20pt" display-align="center" block-progression-dimension="30pt" background-color="yellow"> <svg:svg viewBox="0 0 20 20"> <svg:g style="fill:red; stroke:#000000"> <svg:rect x="0" y="0" width="15" height="15"/> @@ -76,7 +76,7 @@ </fo:block> <fo:block>instream-foreign-object with display-align="after"</fo:block> <fo:block> - <fo:instream-foreign-object content-width="20pt" content-height="20pt" display-align="after" block-progression-dimension="30pt"> + <fo:instream-foreign-object content-width="20pt" content-height="20pt" display-align="after" block-progression-dimension="30pt" background-color="yellow"> <svg:svg viewBox="0 0 20 20"> <svg:g style="fill:red; stroke:#000000"> <svg:rect x="0" y="0" width="15" height="15"/> diff --git a/test/layoutengine/testcases/simple-page-master_reference-orientation_0_region-body_margin_relative.xml b/test/layoutengine/testcases/simple-page-master_reference-orientation_0_region-body_margin_relative.xml new file mode 100644 index 000000000..c68c3aa6a --- /dev/null +++ b/test/layoutengine/testcases/simple-page-master_reference-orientation_0_region-body_margin_relative.xml @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 relative margin on region (region-body). + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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="3in" page-height="5in" margin="5%" reference-orientation="0"> + <fo:region-body margin-top="10%" margin-bottom="5%" margin-left="5%" margin-right="10%" background-color="yellow" /> + <fo:region-before extent="10%" background-color="blue" precedence="true" /> + <fo:region-after extent="5%" background-color="green" precedence="true" /> + <fo:region-start extent="5%" background-color="red" /> + <fo:region-end extent="10%" background-color="orange" /> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block> + r e g i o n b e f o r e + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-after"> + <fo:block> + r e g i o n a f t e r + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-start"> + <fo:block> + r e g i o n s t a r t + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-end"> + <fo:block> + r e g i o n e n d + </fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + Demonstrates relative 5% margin on the page master, 10% margin on regions before + and end and 5% margin on regions start and after. Corresponding margins are set + on the region body. The page size is 5in x 3in with the page reference not rotated. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- region before --> + <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/> + <eval expected="194400" xpath="//page/regionViewport[1]/@ipd"/> + <eval expected="36000" xpath="//page/regionViewport[1]/@bpd"/> + <eval expected="10800 18000 194400 36000" xpath="//page/regionViewport[1]/@rect"/> + <eval expected="194400" xpath="//page/regionViewport[1]/regionBefore/@ipd"/> + <eval expected="36000" xpath="//page/regionViewport[1]/regionBefore/@bpd"/> + <eval expected="[1.0 0.0 0.0 1.0 10800.0 18000.0]" xpath="//page/regionViewport[1]/regionBefore/@ctm"/> + <!-- region start --> + <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/> + <eval expected="10800" xpath="//page/regionViewport[2]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[2]/@bpd"/> + <eval expected="10800 54000 10800 270000" xpath="//page/regionViewport[2]/@rect"/> + <eval expected="10800" xpath="//page/regionViewport[2]/regionStart/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[2]/regionStart/@bpd"/> + <eval expected="[1.0 0.0 0.0 1.0 10800.0 54000.0]" xpath="//page/regionViewport[2]/regionStart/@ctm"/> + <!-- region end --> + <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/> + <eval expected="21600" xpath="//page/regionViewport[3]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[3]/@bpd"/> + <eval expected="183600 54000 21600 270000" xpath="//page/regionViewport[3]/@rect"/> + <eval expected="21600" xpath="//page/regionViewport[3]/regionEnd/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/> + <eval expected="[1.0 0.0 0.0 1.0 183600.0 54000.0]" xpath="//page/regionViewport[3]/regionEnd/@ctm"/> + <!-- region after --> + <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/> + <eval expected="194400" xpath="//page/regionViewport[4]/@ipd"/> + <eval expected="18000" xpath="//page/regionViewport[4]/@bpd"/> + <eval expected="10800 324000 194400 18000" xpath="//page/regionViewport[4]/@rect"/> + <eval expected="194400" xpath="//page/regionViewport[4]/regionAfter/@ipd"/> + <eval expected="18000" xpath="//page/regionViewport[4]/regionAfter/@bpd"/> + <eval expected="[1.0 0.0 0.0 1.0 10800.0 324000.0]" xpath="//page/regionViewport[4]/regionAfter/@ctm"/> + <!-- region body --> + <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/> + <eval expected="162000" xpath="//page/regionViewport[5]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[5]/@bpd"/> + <eval expected="21600 54000 162000 270000" xpath="//page/regionViewport[5]/@rect"/> + <eval expected="162000" xpath="//page/regionViewport[5]/regionBody/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[5]/regionBody/@bpd"/> + <eval expected="[1.0 0.0 0.0 1.0 21600.0 54000.0]" xpath="//page/regionViewport[5]/regionBody/@ctm"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/simple-page-master_reference-orientation_0_writing-mode_rl_region-body_margin_relative.xml b/test/layoutengine/testcases/simple-page-master_reference-orientation_0_writing-mode_rl_region-body_margin_relative.xml new file mode 100644 index 000000000..3269fd9dd --- /dev/null +++ b/test/layoutengine/testcases/simple-page-master_reference-orientation_0_writing-mode_rl_region-body_margin_relative.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 relative margin on region (region-body). + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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="3in" page-height="5in" margin="5%" reference-orientation="0" writing-mode="rl"> + <fo:region-body margin-top="10%" margin-bottom="5%" margin-left="10%" margin-right="5%" background-color="yellow" /> + <fo:region-before extent="10%" background-color="blue" precedence="true" /> + <fo:region-after extent="5%" background-color="green" precedence="true" /> + <fo:region-start extent="5%" background-color="red" /> + <fo:region-end extent="10%" background-color="orange" /> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block> + r e g i o n b e f o r e + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-after"> + <fo:block> + r e g i o n a f t e r + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-start"> + <fo:block> + r e g i o n s t a r t + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-end"> + <fo:block> + r e g i o n e n d + </fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + Demonstrates relative 5% margin on the page master, 10% margin on regions before + and end and 5% margin on regions start and after. Corresponding margins are set + on the region body. The page size is 5in x 3in with the page reference not rotated + and a rl writing-mode. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- region before --> + <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/> + <eval expected="194400" xpath="//page/regionViewport[1]/@ipd"/> + <eval expected="36000" xpath="//page/regionViewport[1]/@bpd"/> + <eval expected="10800 18000 194400 36000" xpath="//page/regionViewport[1]/@rect"/> + <eval expected="194400" xpath="//page/regionViewport[1]/regionBefore/@ipd"/> + <eval expected="36000" xpath="//page/regionViewport[1]/regionBefore/@bpd"/> + <eval expected="[-1.0 0.0 0.0 1.0 205200.0 18000.0]" xpath="//page/regionViewport[1]/regionBefore/@ctm"/> + <!-- region start --> + <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/> + <eval expected="10800" xpath="//page/regionViewport[2]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[2]/@bpd"/> + <eval expected="194400 54000 10800 270000" xpath="//page/regionViewport[2]/@rect"/> + <eval expected="10800" xpath="//page/regionViewport[2]/regionStart/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[2]/regionStart/@bpd"/> + <eval expected="[-1.0 0.0 0.0 1.0 205200.0 54000.0]" xpath="//page/regionViewport[2]/regionStart/@ctm"/> + <!-- region end --> + <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/> + <eval expected="21600" xpath="//page/regionViewport[3]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[3]/@bpd"/> + <eval expected="10800 54000 21600 270000" xpath="//page/regionViewport[3]/@rect"/> + <eval expected="21600" xpath="//page/regionViewport[3]/regionEnd/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/> + <eval expected="[-1.0 0.0 0.0 1.0 32400.0 54000.0]" xpath="//page/regionViewport[3]/regionEnd/@ctm"/> + <!-- region after --> + <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/> + <eval expected="194400" xpath="//page/regionViewport[4]/@ipd"/> + <eval expected="18000" xpath="//page/regionViewport[4]/@bpd"/> + <eval expected="10800 324000 194400 18000" xpath="//page/regionViewport[4]/@rect"/> + <eval expected="194400" xpath="//page/regionViewport[4]/regionAfter/@ipd"/> + <eval expected="18000" xpath="//page/regionViewport[4]/regionAfter/@bpd"/> + <eval expected="[-1.0 0.0 0.0 1.0 205200.0 324000.0]" xpath="//page/regionViewport[4]/regionAfter/@ctm"/> + <!-- region body --> + <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/> + <eval expected="162000" xpath="//page/regionViewport[5]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[5]/@bpd"/> + <eval expected="32400 54000 162000 270000" xpath="//page/regionViewport[5]/@rect"/> + <eval expected="162000" xpath="//page/regionViewport[5]/regionBody/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[5]/regionBody/@bpd"/> + <eval expected="[-1.0 0.0 0.0 1.0 194400.0 54000.0]" xpath="//page/regionViewport[5]/regionBody/@ctm"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/simple-page-master_reference-orientation_180_region-body_margin_relative.xml b/test/layoutengine/testcases/simple-page-master_reference-orientation_180_region-body_margin_relative.xml new file mode 100644 index 000000000..363edc6ed --- /dev/null +++ b/test/layoutengine/testcases/simple-page-master_reference-orientation_180_region-body_margin_relative.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 relative margin on region (region-body). + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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="3in" page-height="5in" margin="5%" reference-orientation="180"> + <fo:region-body margin-top="10%" margin-bottom="5%" margin-left="5%" margin-right="10%" background-color="yellow" /> + <fo:region-before extent="10%" background-color="blue" precedence="true" /> + <fo:region-after extent="5%" background-color="green" precedence="true" /> + <fo:region-start extent="5%" background-color="red" /> + <fo:region-end extent="10%" background-color="orange" /> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block> + r e g i o n b e f o r e + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-after"> + <fo:block> + r e g i o n a f t e r + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-start"> + <fo:block> + r e g i o n s t a r t + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-end"> + <fo:block> + r e g i o n e n d + </fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + Demonstrates relative 5% margin on the page master, 10% margin on regions before + and end and 5% margin on regions start and after. Corresponding margins are set + on the region body. The page size is 5in x 3in with the page reference rotated by + 180 degrees. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- region before --> + <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/> + <eval expected="194400" xpath="//page/regionViewport[1]/@ipd"/> + <eval expected="36000" xpath="//page/regionViewport[1]/@bpd"/> + <eval expected="10800 306000 194400 36000" xpath="//page/regionViewport[1]/@rect"/> + <eval expected="194400" xpath="//page/regionViewport[1]/regionBefore/@ipd"/> + <eval expected="36000" xpath="//page/regionViewport[1]/regionBefore/@bpd"/> + <eval expected="[-1.0 -0.0 0.0 -1.0 205200.0 342000.0]" xpath="//page/regionViewport[1]/regionBefore/@ctm"/> + <!-- region start --> + <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/> + <eval expected="10800" xpath="//page/regionViewport[2]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[2]/@bpd"/> + <eval expected="194400 36000 10800 270000" xpath="//page/regionViewport[2]/@rect"/> + <eval expected="10800" xpath="//page/regionViewport[2]/regionStart/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[2]/regionStart/@bpd"/> + <eval expected="[-1.0 -0.0 0.0 -1.0 205200.0 306000.0]" xpath="//page/regionViewport[2]/regionStart/@ctm"/> + <!-- region end --> + <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/> + <eval expected="21600" xpath="//page/regionViewport[3]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[3]/@bpd"/> + <eval expected="10800 36000 21600 270000" xpath="//page/regionViewport[3]/@rect"/> + <eval expected="21600" xpath="//page/regionViewport[3]/regionEnd/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/> + <eval expected="[-1.0 -0.0 0.0 -1.0 32400.0 306000.0]" xpath="//page/regionViewport[3]/regionEnd/@ctm"/> + <!-- region after --> + <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/> + <eval expected="194400" xpath="//page/regionViewport[4]/@ipd"/> + <eval expected="18000" xpath="//page/regionViewport[4]/@bpd"/> + <eval expected="10800 18000 194400 18000" xpath="//page/regionViewport[4]/@rect"/> + <eval expected="194400" xpath="//page/regionViewport[4]/regionAfter/@ipd"/> + <eval expected="18000" xpath="//page/regionViewport[4]/regionAfter/@bpd"/> + <eval expected="[-1.0 -0.0 0.0 -1.0 205200.0 36000.0]" xpath="//page/regionViewport[4]/regionAfter/@ctm"/> + <!-- region body --> + <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/> + <eval expected="162000" xpath="//page/regionViewport[5]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[5]/@bpd"/> + <eval expected="32400 36000 162000 270000" xpath="//page/regionViewport[5]/@rect"/> + <eval expected="162000" xpath="//page/regionViewport[5]/regionBody/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[5]/regionBody/@bpd"/> + <eval expected="[-1.0 -0.0 0.0 -1.0 194400.0 306000.0]" xpath="//page/regionViewport[5]/regionBody/@ctm"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/simple-page-master_reference-orientation_180_writing-mode_rl_region-body_margin_relative.xml b/test/layoutengine/testcases/simple-page-master_reference-orientation_180_writing-mode_rl_region-body_margin_relative.xml new file mode 100644 index 000000000..f17c83ed1 --- /dev/null +++ b/test/layoutengine/testcases/simple-page-master_reference-orientation_180_writing-mode_rl_region-body_margin_relative.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 relative margin on region (region-body). + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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="3in" page-height="5in" margin="5%" reference-orientation="180" writing-mode="rl"> + <fo:region-body margin-top="10%" margin-bottom="5%" margin-left="10%" margin-right="5%" background-color="yellow" /> + <fo:region-before extent="10%" background-color="blue" precedence="true" /> + <fo:region-after extent="5%" background-color="green" precedence="true" /> + <fo:region-start extent="5%" background-color="red" /> + <fo:region-end extent="10%" background-color="orange" /> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block> + r e g i o n b e f o r e + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-after"> + <fo:block> + r e g i o n a f t e r + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-start"> + <fo:block> + r e g i o n s t a r t + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-end"> + <fo:block> + r e g i o n e n d + </fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + Demonstrates relative 5% margin on the page master, 10% margin on regions before + and end and 5% margin on regions start and after. Corresponding margins are set + on the region body. The page size is 5in x 3in with the page reference rotated by + 180 degrees and a rl writing-mode. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- region before --> + <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/> + <eval expected="194400" xpath="//page/regionViewport[1]/@ipd"/> + <eval expected="36000" xpath="//page/regionViewport[1]/@bpd"/> + <eval expected="10800 306000 194400 36000" xpath="//page/regionViewport[1]/@rect"/> + <eval expected="194400" xpath="//page/regionViewport[1]/regionBefore/@ipd"/> + <eval expected="36000" xpath="//page/regionViewport[1]/regionBefore/@bpd"/> + <eval expected="[1.0 0.0 0.0 -1.0 10800.0 342000.0]" xpath="//page/regionViewport[1]/regionBefore/@ctm"/> + <!-- region start --> + <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/> + <eval expected="10800" xpath="//page/regionViewport[2]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[2]/@bpd"/> + <eval expected="10800 36000 10800 270000" xpath="//page/regionViewport[2]/@rect"/> + <eval expected="10800" xpath="//page/regionViewport[2]/regionStart/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[2]/regionStart/@bpd"/> + <eval expected="[1.0 0.0 0.0 -1.0 10800.0 306000.0]" xpath="//page/regionViewport[2]/regionStart/@ctm"/> + <!-- region end --> + <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/> + <eval expected="21600" xpath="//page/regionViewport[3]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[3]/@bpd"/> + <eval expected="183600 36000 21600 270000" xpath="//page/regionViewport[3]/@rect"/> + <eval expected="21600" xpath="//page/regionViewport[3]/regionEnd/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/> + <eval expected="[1.0 0.0 0.0 -1.0 183600.0 306000.0]" xpath="//page/regionViewport[3]/regionEnd/@ctm"/> + <!-- region after --> + <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/> + <eval expected="194400" xpath="//page/regionViewport[4]/@ipd"/> + <eval expected="18000" xpath="//page/regionViewport[4]/@bpd"/> + <eval expected="10800 18000 194400 18000" xpath="//page/regionViewport[4]/@rect"/> + <eval expected="194400" xpath="//page/regionViewport[4]/regionAfter/@ipd"/> + <eval expected="18000" xpath="//page/regionViewport[4]/regionAfter/@bpd"/> + <eval expected="[1.0 0.0 0.0 -1.0 10800.0 36000.0]" xpath="//page/regionViewport[4]/regionAfter/@ctm"/> + <!-- region body --> + <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/> + <eval expected="162000" xpath="//page/regionViewport[5]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[5]/@bpd"/> + <eval expected="21600 36000 162000 270000" xpath="//page/regionViewport[5]/@rect"/> + <eval expected="162000" xpath="//page/regionViewport[5]/regionBody/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[5]/regionBody/@bpd"/> + <eval expected="[1.0 0.0 0.0 -1.0 21600.0 306000.0]" xpath="//page/regionViewport[5]/regionBody/@ctm"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/simple-page-master_reference-orientation_270_region-body_margin_relative.xml b/test/layoutengine/testcases/simple-page-master_reference-orientation_270_region-body_margin_relative.xml new file mode 100644 index 000000000..e6145ac6c --- /dev/null +++ b/test/layoutengine/testcases/simple-page-master_reference-orientation_270_region-body_margin_relative.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 relative margin on region (region-body). + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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="3in" page-height="5in" margin="5%" reference-orientation="270"> + <fo:region-body margin-top="10%" margin-bottom="5%" margin-left="5%" margin-right="10%" background-color="yellow" /> + <fo:region-before extent="10%" background-color="blue" precedence="true" /> + <fo:region-after extent="5%" background-color="green" precedence="true" /> + <fo:region-start extent="5%" background-color="red" /> + <fo:region-end extent="10%" background-color="orange" /> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block> + r e g i o n b e f o r e + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-after"> + <fo:block> + r e g i o n a f t e r + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-start"> + <fo:block> + r e g i o n s t a r t + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-end"> + <fo:block> + r e g i o n e n d + </fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + Demonstrates relative 5% margin on the page master, 10% margin on regions before + and end and 5% margin on regions start and after. Corresponding margins are set + on the region body. The page size is 5in x 3in with the page reference rotated by + 270 degrees. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- region before --> + <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/> + <eval expected="324000" xpath="//page/regionViewport[1]/@ipd"/> + <eval expected="21600" xpath="//page/regionViewport[1]/@bpd"/> + <eval expected="183600 18000 21600 324000" xpath="//page/regionViewport[1]/@rect"/> + <eval expected="324000" xpath="//page/regionViewport[1]/regionBefore/@ipd"/> + <eval expected="21600" xpath="//page/regionViewport[1]/regionBefore/@bpd"/> + <eval expected="[0.0 1.0 -1.0 0.0 205200.0 18000.0]" xpath="//page/regionViewport[1]/regionBefore/@ctm"/> + <!-- region start --> + <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/> + <eval expected="18000" xpath="//page/regionViewport[2]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[2]/@bpd"/> + <eval expected="21600 18000 162000 18000" xpath="//page/regionViewport[2]/@rect"/> + <eval expected="18000" xpath="//page/regionViewport[2]/regionStart/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[2]/regionStart/@bpd"/> + <eval expected="[0.0 1.0 -1.0 0.0 183600.0 18000.0]" xpath="//page/regionViewport[2]/regionStart/@ctm"/> + <!-- region end --> + <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/> + <eval expected="36000" xpath="//page/regionViewport[3]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[3]/@bpd"/> + <eval expected="21600 306000 162000 36000" xpath="//page/regionViewport[3]/@rect"/> + <eval expected="36000" xpath="//page/regionViewport[3]/regionEnd/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/> + <eval expected="[0.0 1.0 -1.0 0.0 183600.0 306000.0]" xpath="//page/regionViewport[3]/regionEnd/@ctm"/> + <!-- region after --> + <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/> + <eval expected="324000" xpath="//page/regionViewport[4]/@ipd"/> + <eval expected="10800" xpath="//page/regionViewport[4]/@bpd"/> + <eval expected="10800 18000 10800 324000" xpath="//page/regionViewport[4]/@rect"/> + <eval expected="324000" xpath="//page/regionViewport[4]/regionAfter/@ipd"/> + <eval expected="10800" xpath="//page/regionViewport[4]/regionAfter/@bpd"/> + <eval expected="[0.0 1.0 -1.0 0.0 21600.0 18000.0]" xpath="//page/regionViewport[4]/regionAfter/@ctm"/> + <!-- region body --> + <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/> + <eval expected="270000" xpath="//page/regionViewport[5]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[5]/@bpd"/> + <eval expected="21600 36000 162000 270000" xpath="//page/regionViewport[5]/@rect"/> + <eval expected="270000" xpath="//page/regionViewport[5]/regionBody/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[5]/regionBody/@bpd"/> + <eval expected="[0.0 1.0 -1.0 0.0 183600.0 36000.0]" xpath="//page/regionViewport[5]/regionBody/@ctm"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/simple-page-master_reference-orientation_270_writing-mode_rl_region-body_margin_relative.xml b/test/layoutengine/testcases/simple-page-master_reference-orientation_270_writing-mode_rl_region-body_margin_relative.xml new file mode 100644 index 000000000..b3808fd4f --- /dev/null +++ b/test/layoutengine/testcases/simple-page-master_reference-orientation_270_writing-mode_rl_region-body_margin_relative.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 relative margin on region (region-body). + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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="3in" page-height="5in" margin="5%" reference-orientation="270" writing-mode="rl"> + <fo:region-body margin-top="10%" margin-bottom="5%" margin-left="10%" margin-right="5%" background-color="yellow" /> + <fo:region-before extent="10%" background-color="blue" precedence="true" /> + <fo:region-after extent="5%" background-color="green" precedence="true" /> + <fo:region-start extent="5%" background-color="red" /> + <fo:region-end extent="10%" background-color="orange" /> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block> + r e g i o n b e f o r e + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-after"> + <fo:block> + r e g i o n a f t e r + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-start"> + <fo:block> + r e g i o n s t a r t + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-end"> + <fo:block> + r e g i o n e n d + </fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + Demonstrates relative 5% margin on the page master, 10% margin on regions before + and end and 5% margin on regions start and after. Corresponding margins are set + on the region body. The page size is 5in x 3in with the page reference rotated by + 270 degrees and a rl writing-mode. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- region before --> + <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/> + <eval expected="324000" xpath="//page/regionViewport[1]/@ipd"/> + <eval expected="21600" xpath="//page/regionViewport[1]/@bpd"/> + <eval expected="183600 18000 21600 324000" xpath="//page/regionViewport[1]/@rect"/> + <eval expected="324000" xpath="//page/regionViewport[1]/regionBefore/@ipd"/> + <eval expected="21600" xpath="//page/regionViewport[1]/regionBefore/@bpd"/> + <eval expected="[-0.0 -1.0 -1.0 0.0 205200.0 342000.0]" xpath="//page/regionViewport[1]/regionBefore/@ctm"/> + <!-- region start --> + <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/> + <eval expected="18000" xpath="//page/regionViewport[2]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[2]/@bpd"/> + <eval expected="21600 324000 162000 18000" xpath="//page/regionViewport[2]/@rect"/> + <eval expected="18000" xpath="//page/regionViewport[2]/regionStart/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[2]/regionStart/@bpd"/> + <eval expected="[-0.0 -1.0 -1.0 0.0 183600.0 342000.0]" xpath="//page/regionViewport[2]/regionStart/@ctm"/> + <!-- region end --> + <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/> + <eval expected="36000" xpath="//page/regionViewport[3]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[3]/@bpd"/> + <eval expected="21600 18000 162000 36000" xpath="//page/regionViewport[3]/@rect"/> + <eval expected="36000" xpath="//page/regionViewport[3]/regionEnd/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/> + <eval expected="[-0.0 -1.0 -1.0 0.0 183600.0 54000.0]" xpath="//page/regionViewport[3]/regionEnd/@ctm"/> + <!-- region after --> + <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/> + <eval expected="324000" xpath="//page/regionViewport[4]/@ipd"/> + <eval expected="10800" xpath="//page/regionViewport[4]/@bpd"/> + <eval expected="10800 18000 10800 324000" xpath="//page/regionViewport[4]/@rect"/> + <eval expected="324000" xpath="//page/regionViewport[4]/regionAfter/@ipd"/> + <eval expected="10800" xpath="//page/regionViewport[4]/regionAfter/@bpd"/> + <eval expected="[-0.0 -1.0 -1.0 0.0 21600.0 342000.0]" xpath="//page/regionViewport[4]/regionAfter/@ctm"/> + <!-- region body --> + <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/> + <eval expected="270000" xpath="//page/regionViewport[5]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[5]/@bpd"/> + <eval expected="21600 54000 162000 270000" xpath="//page/regionViewport[5]/@rect"/> + <eval expected="270000" xpath="//page/regionViewport[5]/regionBody/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[5]/regionBody/@bpd"/> + <eval expected="[-0.0 -1.0 -1.0 0.0 183600.0 324000.0]" xpath="//page/regionViewport[5]/regionBody/@ctm"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/simple-page-master_reference-orientation_90_region-body_margin_relative.xml b/test/layoutengine/testcases/simple-page-master_reference-orientation_90_region-body_margin_relative.xml new file mode 100644 index 000000000..959484c4c --- /dev/null +++ b/test/layoutengine/testcases/simple-page-master_reference-orientation_90_region-body_margin_relative.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 relative margin on region (region-body). + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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="3in" page-height="5in" margin="5%" reference-orientation="90"> + <fo:region-body margin-top="10%" margin-bottom="5%" margin-left="5%" margin-right="10%" background-color="yellow" /> + <fo:region-before extent="10%" background-color="blue" precedence="true" /> + <fo:region-after extent="5%" background-color="green" precedence="true" /> + <fo:region-start extent="5%" background-color="red" /> + <fo:region-end extent="10%" background-color="orange" /> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block> + r e g i o n b e f o r e + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-after"> + <fo:block> + r e g i o n a f t e r + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-start"> + <fo:block> + r e g i o n s t a r t + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-end"> + <fo:block> + r e g i o n e n d + </fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + Demonstrates relative 5% margin on the page master, 10% margin on regions before + and end and 5% margin on regions start and after. Corresponding margins are set + on the region body. The page size is 5in x 3in with the page reference rotated by + 90 degrees. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- region before --> + <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/> + <eval expected="324000" xpath="//page/regionViewport[1]/@ipd"/> + <eval expected="21600" xpath="//page/regionViewport[1]/@bpd"/> + <eval expected="10800 18000 21600 324000" xpath="//page/regionViewport[1]/@rect"/> + <eval expected="324000" xpath="//page/regionViewport[1]/regionBefore/@ipd"/> + <eval expected="21600" xpath="//page/regionViewport[1]/regionBefore/@bpd"/> + <eval expected="[0.0 -1.0 1.0 0.0 10800.0 342000.0]" xpath="//page/regionViewport[1]/regionBefore/@ctm"/> + <!-- region start --> + <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/> + <eval expected="18000" xpath="//page/regionViewport[2]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[2]/@bpd"/> + <eval expected="32400 324000 162000 18000" xpath="//page/regionViewport[2]/@rect"/> + <eval expected="18000" xpath="//page/regionViewport[2]/regionStart/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[2]/regionStart/@bpd"/> + <eval expected="[0.0 -1.0 1.0 0.0 32400.0 342000.0]" xpath="//page/regionViewport[2]/regionStart/@ctm"/> + <!-- region end --> + <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/> + <eval expected="36000" xpath="//page/regionViewport[3]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[3]/@bpd"/> + <eval expected="32400 18000 162000 36000" xpath="//page/regionViewport[3]/@rect"/> + <eval expected="36000" xpath="//page/regionViewport[3]/regionEnd/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/> + <eval expected="[0.0 -1.0 1.0 0.0 32400.0 54000.0]" xpath="//page/regionViewport[3]/regionEnd/@ctm"/> + <!-- region after --> + <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/> + <eval expected="324000" xpath="//page/regionViewport[4]/@ipd"/> + <eval expected="10800" xpath="//page/regionViewport[4]/@bpd"/> + <eval expected="194400 18000 10800 324000" xpath="//page/regionViewport[4]/@rect"/> + <eval expected="324000" xpath="//page/regionViewport[4]/regionAfter/@ipd"/> + <eval expected="10800" xpath="//page/regionViewport[4]/regionAfter/@bpd"/> + <eval expected="[0.0 -1.0 1.0 0.0 194400.0 342000.0]" xpath="//page/regionViewport[4]/regionAfter/@ctm"/> + <!-- region body --> + <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/> + <eval expected="270000" xpath="//page/regionViewport[5]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[5]/@bpd"/> + <eval expected="32400 54000 162000 270000" xpath="//page/regionViewport[5]/@rect"/> + <eval expected="270000" xpath="//page/regionViewport[5]/regionBody/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[5]/regionBody/@bpd"/> + <eval expected="[0.0 -1.0 1.0 0.0 32400.0 324000.0]" xpath="//page/regionViewport[5]/regionBody/@ctm"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/simple-page-master_reference-orientation_90_writing-mode_rl_region-body_margin_relative.xml b/test/layoutengine/testcases/simple-page-master_reference-orientation_90_writing-mode_rl_region-body_margin_relative.xml new file mode 100644 index 000000000..ac7635645 --- /dev/null +++ b/test/layoutengine/testcases/simple-page-master_reference-orientation_90_writing-mode_rl_region-body_margin_relative.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 relative margin on region (region-body). + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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="3in" page-height="5in" margin="5%" reference-orientation="90" writing-mode="rl"> + <fo:region-body margin-top="10%" margin-bottom="5%" margin-left="10%" margin-right="5%" background-color="yellow" /> + <fo:region-before extent="10%" background-color="blue" precedence="true" /> + <fo:region-after extent="5%" background-color="green" precedence="true" /> + <fo:region-start extent="5%" background-color="red" /> + <fo:region-end extent="10%" background-color="orange" /> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block> + r e g i o n b e f o r e + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-after"> + <fo:block> + r e g i o n a f t e r + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-start"> + <fo:block> + r e g i o n s t a r t + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-end"> + <fo:block> + r e g i o n e n d + </fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + Demonstrates relative 5% margin on the page master, 10% margin on regions before + and end and 5% margin on regions start and after. Corresponding margins are set + on the region body. The page size is 5in x 3in with the page reference rotated by + 90 degrees and a rl writing-mode. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- region before --> + <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/> + <eval expected="324000" xpath="//page/regionViewport[1]/@ipd"/> + <eval expected="21600" xpath="//page/regionViewport[1]/@bpd"/> + <eval expected="10800 18000 21600 324000" xpath="//page/regionViewport[1]/@rect"/> + <eval expected="324000" xpath="//page/regionViewport[1]/regionBefore/@ipd"/> + <eval expected="21600" xpath="//page/regionViewport[1]/regionBefore/@bpd"/> + <eval expected="[0.0 1.0 1.0 0.0 10800.0 18000.0]" xpath="//page/regionViewport[1]/regionBefore/@ctm"/> + <!-- region start --> + <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/> + <eval expected="18000" xpath="//page/regionViewport[2]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[2]/@bpd"/> + <eval expected="32400 18000 162000 18000" xpath="//page/regionViewport[2]/@rect"/> + <eval expected="18000" xpath="//page/regionViewport[2]/regionStart/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[2]/regionStart/@bpd"/> + <eval expected="[0.0 1.0 1.0 0.0 32400.0 18000.0]" xpath="//page/regionViewport[2]/regionStart/@ctm"/> + <!-- region end --> + <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/> + <eval expected="36000" xpath="//page/regionViewport[3]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[3]/@bpd"/> + <eval expected="32400 306000 162000 36000" xpath="//page/regionViewport[3]/@rect"/> + <eval expected="36000" xpath="//page/regionViewport[3]/regionEnd/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/> + <eval expected="[0.0 1.0 1.0 0.0 32400.0 306000.0]" xpath="//page/regionViewport[3]/regionEnd/@ctm"/> + <!-- region after --> + <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/> + <eval expected="324000" xpath="//page/regionViewport[4]/@ipd"/> + <eval expected="10800" xpath="//page/regionViewport[4]/@bpd"/> + <eval expected="194400 18000 10800 324000" xpath="//page/regionViewport[4]/@rect"/> + <eval expected="324000" xpath="//page/regionViewport[4]/regionAfter/@ipd"/> + <eval expected="10800" xpath="//page/regionViewport[4]/regionAfter/@bpd"/> + <eval expected="[0.0 1.0 1.0 0.0 194400.0 18000.0]" xpath="//page/regionViewport[4]/regionAfter/@ctm"/> + <!-- region body --> + <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/> + <eval expected="270000" xpath="//page/regionViewport[5]/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[5]/@bpd"/> + <eval expected="32400 36000 162000 270000" xpath="//page/regionViewport[5]/@rect"/> + <eval expected="270000" xpath="//page/regionViewport[5]/regionBody/@ipd"/> + <eval expected="162000" xpath="//page/regionViewport[5]/regionBody/@bpd"/> + <eval expected="[0.0 1.0 1.0 0.0 32400.0 36000.0]" xpath="//page/regionViewport[5]/regionBody/@ctm"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/simple-page-master_writing-mode_rl_region-body_writing-mode-lr.xml b/test/layoutengine/testcases/simple-page-master_writing-mode_rl_region-body_writing-mode-lr.xml new file mode 100644 index 000000000..b5383093f --- /dev/null +++ b/test/layoutengine/testcases/simple-page-master_writing-mode_rl_region-body_writing-mode-lr.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2005 The Apache Software Foundation + + Licensed 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 relative margin on region (region-body). + </p> + </info> + <variables> + <img>../../resources/images/bgimg300dpi.jpg</img> + </variables> + <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="3in" page-height="5in" margin="5%" reference-orientation="0" writing-mode="rl"> + <fo:region-body margin-top="10%" margin-bottom="5%" margin-left="10%" margin-right="5%" background-color="yellow" writing-mode="lr"/> + <fo:region-before extent="10%" background-color="blue" precedence="true" /> + <fo:region-after extent="5%" background-color="green" precedence="true" /> + <fo:region-start extent="5%" background-color="red" writing-mode="tb"/> + <fo:region-end extent="10%" background-color="orange" writing-mode="tb"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="normal" white-space-collapse="true"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block> + r e g i o n b e f o r e + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-after"> + <fo:block> + r e g i o n a f t e r + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-start"> + <fo:block> + r e g i o n s t a r t top - bottom + </fo:block> + </fo:static-content> + <fo:static-content flow-name="xsl-region-end"> + <fo:block> + r e g i o n e n d top - bottom + </fo:block> + </fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + Demonstrates relative 5% margin on the page master, 10% margin on regions before + and end and 5% margin on regions start and after. Corresponding margins are set + on the region body. The page size is 5in x 3in with the page reference not rotated + and a rl writing-mode on the page master, a normal writing mode on the region-body + and tb writing mode on start and end regions. + </fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <!-- region before --> + <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/> + <eval expected="194400" xpath="//page/regionViewport[1]/@ipd"/> + <eval expected="36000" xpath="//page/regionViewport[1]/@bpd"/> + <eval expected="10800 18000 194400 36000" xpath="//page/regionViewport[1]/@rect"/> + <eval expected="194400" xpath="//page/regionViewport[1]/regionBefore/@ipd"/> + <eval expected="36000" xpath="//page/regionViewport[1]/regionBefore/@bpd"/> + <eval expected="[-1.0 0.0 0.0 1.0 205200.0 18000.0]" xpath="//page/regionViewport[1]/regionBefore/@ctm"/> + <!-- region start --> + <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/> + <eval expected="10800" xpath="//page/regionViewport[2]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[2]/@bpd"/> + <eval expected="194400 54000 10800 270000" xpath="//page/regionViewport[2]/@rect"/> + <eval expected="270000" xpath="//page/regionViewport[2]/regionStart/@ipd"/> + <eval expected="10800" xpath="//page/regionViewport[2]/regionStart/@bpd"/> + <eval expected="[0.0 1.0 -1.0 0.0 205200.0 54000.0]" xpath="//page/regionViewport[2]/regionStart/@ctm"/> + <!-- region end --> + <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/> + <eval expected="21600" xpath="//page/regionViewport[3]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[3]/@bpd"/> + <eval expected="10800 54000 21600 270000" xpath="//page/regionViewport[3]/@rect"/> + <eval expected="270000" xpath="//page/regionViewport[3]/regionEnd/@ipd"/> + <eval expected="21600" xpath="//page/regionViewport[3]/regionEnd/@bpd"/> + <eval expected="[0.0 1.0 -1.0 0.0 32400.0 54000.0]" xpath="//page/regionViewport[3]/regionEnd/@ctm"/> + <!-- region after --> + <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/> + <eval expected="194400" xpath="//page/regionViewport[4]/@ipd"/> + <eval expected="18000" xpath="//page/regionViewport[4]/@bpd"/> + <eval expected="10800 324000 194400 18000" xpath="//page/regionViewport[4]/@rect"/> + <eval expected="194400" xpath="//page/regionViewport[4]/regionAfter/@ipd"/> + <eval expected="18000" xpath="//page/regionViewport[4]/regionAfter/@bpd"/> + <eval expected="[-1.0 0.0 0.0 1.0 205200.0 324000.0]" xpath="//page/regionViewport[4]/regionAfter/@ctm"/> + <!-- region body --> + <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/> + <eval expected="162000" xpath="//page/regionViewport[5]/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[5]/@bpd"/> + <eval expected="32400 54000 162000 270000" xpath="//page/regionViewport[5]/@rect"/> + <eval expected="162000" xpath="//page/regionViewport[5]/regionBody/@ipd"/> + <eval expected="270000" xpath="//page/regionViewport[5]/regionBody/@bpd"/> + <eval expected="[1.0 0.0 0.0 1.0 32400.0 54000.0]" xpath="//page/regionViewport[5]/regionBody/@ctm"/> + </checks> +</testcase> diff --git a/test/layoutengine/testcases/table-cell_background-image.xml b/test/layoutengine/testcases/table-cell_background-image.xml index 9dcffe96e..dbb9cd42f 100644 --- a/test/layoutengine/testcases/table-cell_background-image.xml +++ b/test/layoutengine/testcases/table-cell_background-image.xml @@ -39,20 +39,20 @@ <fo:table-column />
<fo:table-body>
<fo:table-row>
- <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="blue"
+ <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="blue"
background-image="##img"
background-position-horizontal="right"
background-repeat="no-repeat">
<fo:block>image in top right corner</fo:block>
</fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="green"
+ <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="green"
background-image="##img"
background-position-horizontal="right"
background-position-vertical="center"
background-repeat="no-repeat">
<fo:block>image in center right</fo:block>
</fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="yellow"
+ <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="yellow"
background-image="##img"
background-position-horizontal="right"
background-position-vertical="bottom"
@@ -61,20 +61,20 @@ </fo:table-cell>
</fo:table-row>
<fo:table-row>
- <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="yellow"
+ <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="yellow"
background-image="##img"
background-position-horizontal="center"
background-repeat="no-repeat">
<fo:block>image in top center</fo:block>
</fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="blue"
+ <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="blue"
background-image="##img"
background-position-horizontal="center"
background-position-vertical="center"
background-repeat="no-repeat">
<fo:block>image in center</fo:block>
</fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="green"
+ <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="green"
background-image="##img"
background-position-horizontal="center"
background-position-vertical="bottom"
@@ -83,18 +83,18 @@ </fo:table-cell>
</fo:table-row>
<fo:table-row>
- <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="green"
+ <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="green"
background-image="##img"
background-repeat="no-repeat">
<fo:block>image in top left</fo:block>
</fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="yellow"
+ <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="yellow"
background-image="##img"
background-position-vertical="center"
background-repeat="no-repeat">
<fo:block>image in center left</fo:block>
</fo:table-cell>
- <fo:table-cell margin="0pt" padding="5pt" height="1in" background-color="blue"
+ <fo:table-cell margin="0pt" padding="5pt 10pt 20pt 15pt" height="1in" background-color="blue"
background-image="##img"
background-position-vertical="bottom"
background-repeat="no-repeat">
@@ -111,20 +111,20 @@ <!-- first cell in row 1 -->
<eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=0" xpath="//flow/block/block[1]/@background"/>
<!-- second cell in row 1 -->
- <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=20995" xpath="//flow/block/block[2]/@background"/>
+ <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=28495" xpath="//flow/block/block[2]/@background"/>
<!-- third cell in row 1 -->
- <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=41991" xpath="//flow/block/block[3]/@background"/>
+ <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=69991,vertical=56991" xpath="//flow/block/block[3]/@background"/>
<!-- first cell in row 2 -->
<eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=0" xpath="//flow/block/block[4]/@background"/>
<!-- second cell in row 2 -->
- <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=20995" xpath="//flow/block/block[5]/@background"/>
+ <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=28495" xpath="//flow/block/block[5]/@background"/>
<!-- third cell in row 2 -->
- <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=41991" xpath="//flow/block/block[6]/@background"/>
+ <eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=34995,vertical=56991" xpath="//flow/block/block[6]/@background"/>
<!-- first cell in row 3 -->
<eval expected="color=#008000,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=0" xpath="//flow/block/block[7]/@background"/>
<!-- second cell in row 3 -->
- <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=20995" xpath="//flow/block/block[8]/@background"/>
+ <eval expected="color=#ffff00,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=28495" xpath="//flow/block/block[8]/@background"/>
<!-- third cell in row 3 -->
- <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=41991" xpath="//flow/block/block[9]/@background"/>
+ <eval expected="color=#0000ff,url=../../resources/images/box1.png,repeat=no-repeat,horiz=0,vertical=56991" xpath="//flow/block/block[9]/@background"/>
</checks>
-</testcase>
+</testcase>
\ No newline at end of file |