You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by bc...@apache.org on 2005/08/31 22:30:49 UTC

svn commit: r265577 [5/5] - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/area/ src/java/org/apache/fop/datatypes/ src/java/org/apache/fop/fo/ src/java/org/apache/fop/fo/expr/ src/java/org/apache/fop/fo/flow/ src/java/org/apache/fop/fo/pagination/...

Modified: xmlgraphics/fop/trunk/test/layoutengine/testcases/external-graphic4.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/external-graphic4.xml?rev=265577&r1=265576&r2=265577&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/external-graphic4.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/external-graphic4.xml Wed Aug 31 13:29:33 2005
@@ -1,52 +1,49 @@
-<?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 external-graphics. An oversized image is to be squeezed into page using min/opt/max values.
-    </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="21cm" page-height="29.7cm" margin="2cm">
-          <fo:region-body background-color="yellow"/>
-        </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 font-size="8pt">This first block is only to force an infinite loop if the image is not scaled down.</fo:block>
-          <!-- TODO If you remove the above block, the image is placed on the page although it's too big. No warnings. -->
-          <fo:block>
-            <fo:external-graphic src="../../resources/images/big-image.png" 
-                inline-progression-dimension.maximum="100%" block-progression-dimension.maximum="100%"
-                content-width="scale-to-fit" content-height="scale-to-fit" overflow="hidden"/>
-          </fo:block>
-          <fo:block>EOF</fo:block>
-        </fo:flow>
-      </fo:page-sequence>
-    </fo:root>
-  </fo>
-  <checks>
-    <eval expected="0 0 595275 841889" xpath="//pageViewport/@bounds"/>
-    <eval expected="481891" xpath="//regionBody/@ipda"/>
-    <eval expected="728505" xpath="//regionBody/@bpda"/>
-    <eval expected="481891" xpath="//flow/block[2]/lineArea/viewport/@ipda"/>
-    <eval expected="728505" xpath="//flow/block[2]/lineArea/viewport/@bpda + //flow/block[1]/@bpda"/>
-  </checks>
-</testcase>
+<?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 external-graphics with relative content-height
+    </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>plain external-graphic</fo:block>
+          <fo:block>
+            <fo:external-graphic src="../../resources/images/bgimg300dpi.jpg" content-height="200%" content-width="200%" />EOG
+          </fo:block>
+          <fo:block>EOF</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="360000" xpath="//flow/block[2]/@ipd"/>
+    <eval expected="92160" xpath="//flow/block[2]/lineArea/viewport/@ipd"/>
+    <eval expected="92160" xpath="//flow/block[2]/lineArea/viewport/@ipda"/>
+    <eval expected="92160" xpath="//flow/block[2]/lineArea/viewport/@bpd"/>
+    <eval expected="92160" xpath="//flow/block[2]/lineArea/viewport/@bpda"/>
+  </checks>
+</testcase>

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/font-stretch.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/font-stretch.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/font-stretch.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/font-stretch.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,55 @@
+<?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 font stretches.
+    </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="210mm" page-height="297mm">
+          <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 font-family="serif">font-family="serif" font-stretch not given</fo:block>
+          <fo:block font-family="serif" font-stretch="ultra-condensed">font-family="serif" font-stretch="ultra-condensed"
+            <fo:block font-family="serif" font-stretch="narrower">font-family="serif" font-stretch="narrower"</fo:block>
+          </fo:block>  
+          <fo:block font-family="serif" font-stretch="extra-condensed">font-family="serif" font-stretch="extra-condensed"</fo:block>
+          <fo:block font-family="serif" font-stretch="condensed">font-family="serif" font-stretch="condensed"</fo:block>
+          <fo:block font-family="serif" font-stretch="semi-condensed">font-family="serif" font-stretch="semi-condensed"</fo:block>
+          <fo:block font-family="serif" font-stretch="normal">font-family="serif" font-stretch="normal"</fo:block>
+          <fo:block font-family="serif" font-stretch="semi-expanded">font-family="serif" font-stretch="semi-expanded"</fo:block>
+          <fo:block font-family="serif" font-stretch="expanded">font-family="serif" font-stretch="expanded"</fo:block>
+          <fo:block font-family="serif" font-stretch="extra-expanded">font-family="serif" font-stretch="extra-expanded"</fo:block>
+          <fo:block font-family="serif" font-stretch="ultra-expanded">font-family="serif" font-stretch="ultra-expanded"
+            <fo:block font-family="serif" font-stretch="wider">font-family="serif" font-stretch="wider"</fo:block>
+          </fo:block>
+          <fo:block font-family="serif" font-stretch="narrower">font-family="serif" font-stretch="narrower"</fo:block>
+          <fo:block font-family="serif" font-stretch="wider">font-family="serif" font-stretch="wider"</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/font-stretch.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-alignment.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-alignment.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-alignment.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-alignment.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,67 @@
+<?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 leaders
+    </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="6in">
+          <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 margin="0pt" padding-left="10mm">
+                margin="0pt" padding-left="10mm"
+          </fo:block>
+          <fo:block padding-left="10mm">
+                padding-left="10mm"
+          </fo:block>
+          <fo:block>
+            <fo:leader leader-length.minimum="12pt"
+              leader-length.optimum="80pt"
+              leader-length.maximum="100%" leader-pattern="dots" leader-alignment="page"/>
+              leader-alignment="page"
+          </fo:block>
+          <fo:block margin="0pt" padding-left="10mm">
+            <fo:leader leader-length.minimum="12pt"
+              leader-length.optimum="80pt"
+              leader-length.maximum="100%" leader-pattern="dots" leader-alignment="page"/>
+              leader-alignment="page"
+          </fo:block>
+          <fo:block margin="0pt" padding-left="5mm">
+            <fo:leader leader-length.minimum="12pt"
+              leader-length.optimum="80pt"
+              leader-length.maximum="100%" leader-pattern="dots" leader-alignment="reference-area"/>
+              leader-alignment="reference-area"
+            <fo:leader leader-length.minimum="12pt"
+              leader-length.optimum="80pt"
+              leader-length.maximum="100%" leader-pattern="dots" leader-alignment="reference-area"/>
+              leader-alignment="reference-area" Leader-pattern is aligned as if it began on the current reference-area's content-rectangle start-edge.
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-alignment.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-dots.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-dots.xml?rev=265577&r1=265576&r2=265577&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-dots.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-dots.xml Wed Aug 31 13:29:33 2005
@@ -43,17 +43,48 @@
                  leader-length="20mm" leader-pattern-width="5mm"
           </fo:block>
           <fo:block>
+            <fo:leader leader-pattern="dots" leader-length="20%" leader-pattern-width="5mm"/>
+                 leader-length="20%" leader-pattern-width="5mm"
+          </fo:block>
+          <fo:block>
             <fo:leader leader-pattern="dots" leader-pattern-width="1pt"/>
                 leader-pattern-width="1pt"
           </fo:block>
           <fo:block>
-            <fo:leader leader-pattern="dots" leader-pattern-width="5%"/>
-                leader-pattern-width="5%"
+            <fo:leader leader-pattern="dots" leader-length="20%" leader-pattern-width="5%"/>
+                leader-length="20%" leader-pattern-width="5%"
           </fo:block>
         </fo:flow>
       </fo:page-sequence>
     </fo:root>
   </fo>
   <checks>
+    <eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[1]/lineArea/inlineparent/@ipd"/>
+    <eval expected="3" xpath="count(//flow/block[1]/lineArea/inlineparent/text)"/>
+    <eval expected="14400" xpath="//flow/block[2]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[2]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[2]/lineArea/inlineparent/@ipd"/>
+    <eval expected="3" xpath="count(//flow/block[2]/lineArea/inlineparent/text)"/>
+    <eval expected="14400" xpath="//flow/block[3]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[3]/lineArea/@ipd"/>
+    <eval expected="56692" xpath="//flow/block[3]/lineArea/inlineparent/@ipd"/>
+    <eval expected="4" xpath="count(//flow/block[3]/lineArea/inlineparent/text)"/>
+    <eval expected="4" xpath="count(//flow/block[3]/lineArea/inlineparent/space)"/>
+    <eval expected="14400" xpath="//flow/block[4]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[4]/lineArea/@ipd"/>
+    <eval expected="72000" xpath="//flow/block[4]/lineArea/inlineparent/@ipd"/>
+    <eval expected="5" xpath="count(//flow/block[4]/lineArea/inlineparent/text)"/>
+    <eval expected="5" xpath="count(//flow/block[4]/lineArea/inlineparent/space)"/>
+    <eval expected="14400" xpath="//flow/block[5]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[5]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[5]/lineArea/inlineparent/@ipd"/>
+    <eval expected="3" xpath="count(//flow/block[5]/lineArea/inlineparent/text)"/>
+    <eval expected="14400" xpath="//flow/block[6]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[6]/lineArea/@ipd"/>
+    <eval expected="72000" xpath="//flow/block[6]/lineArea/inlineparent/@ipd"/>
+    <eval expected="4" xpath="count(//flow/block[6]/lineArea/inlineparent/text)"/>
+    <eval expected="4" xpath="count(//flow/block[6]/lineArea/inlineparent/space)"/>
   </checks>
 </testcase>

Modified: xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-rule.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-rule.xml?rev=265577&r1=265576&r2=265577&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-rule.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-rule.xml Wed Aug 31 13:29:33 2005
@@ -123,5 +123,77 @@
     </fo:root>
   </fo>
   <checks>
+    <eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[1]/lineArea/leader/@ipd"/>
+    <eval expected="solid" xpath="//flow/block[1]/lineArea/leader/@ruleStyle"/>
+    <eval expected="1000" xpath="//flow/block[1]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[2]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[2]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[2]/lineArea/leader/@ipd"/>
+    <eval expected="--NYI--" xpath="//flow/block[2]/lineArea/leader/@ruleStyle"/>
+    <eval expected="1000" xpath="//flow/block[2]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[3]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[3]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[3]/lineArea/leader/@ipd"/>
+    <eval expected="dotted" xpath="//flow/block[3]/lineArea/leader/@ruleStyle"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[4]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[4]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[4]/lineArea/leader/@ipd"/>
+    <eval expected="dashed" xpath="//flow/block[4]/lineArea/leader/@ruleStyle"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[5]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[5]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[5]/lineArea/leader/@ipd"/>
+    <eval expected="solid" xpath="//flow/block[5]/lineArea/leader/@ruleStyle"/>
+    <eval expected="1000" xpath="//flow/block[5]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[6]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[6]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[6]/lineArea/leader/@ipd"/>
+    <eval expected="double" xpath="//flow/block[6]/lineArea/leader/@ruleStyle"/>
+    <eval expected="1000" xpath="//flow/block[6]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[7]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[7]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[7]/lineArea/leader/@ipd"/>
+    <eval expected="groove" xpath="//flow/block[7]/lineArea/leader/@ruleStyle"/>
+    <eval expected="1000" xpath="//flow/block[7]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[8]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[8]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[8]/lineArea/leader/@ipd"/>
+    <eval expected="ridge" xpath="//flow/block[8]/lineArea/leader/@ruleStyle"/>
+    <eval expected="1000" xpath="//flow/block[8]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[9]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[9]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[9]/lineArea/leader/@ipd"/>
+    <eval expected="dotted" xpath="//flow/block[9]/lineArea/leader/@ruleStyle"/>
+    <eval expected="3000" xpath="//flow/block[9]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[10]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[10]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[10]/lineArea/leader/@ipd"/>
+    <eval expected="dashed" xpath="//flow/block[10]/lineArea/leader/@ruleStyle"/>
+    <eval expected="3000" xpath="//flow/block[10]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[11]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[11]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[11]/lineArea/leader/@ipd"/>
+    <eval expected="solid" xpath="//flow/block[11]/lineArea/leader/@ruleStyle"/>
+    <eval expected="3000" xpath="//flow/block[11]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[12]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[12]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[12]/lineArea/leader/@ipd"/>
+    <eval expected="double" xpath="//flow/block[12]/lineArea/leader/@ruleStyle"/>
+    <eval expected="3000" xpath="//flow/block[12]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[13]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[13]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[13]/lineArea/leader/@ipd"/>
+    <eval expected="groove" xpath="//flow/block[13]/lineArea/leader/@ruleStyle"/>
+    <eval expected="3000" xpath="//flow/block[13]/lineArea/leader/@ruleThickness"/>
+    <eval expected="14400" xpath="//flow/block[14]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[14]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[14]/lineArea/leader/@ipd"/>
+    <eval expected="ridge" xpath="//flow/block[14]/lineArea/leader/@ruleStyle"/>
+    <eval expected="3000" xpath="//flow/block[14]/lineArea/leader/@ruleThickness"/>
+    <!-- No checks for the "alignment-baseline=..." section as this property is currently
+     not supported -->
   </checks>
 </testcase>

Modified: xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-space.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-space.xml?rev=265577&r1=265576&r2=265577&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-space.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-space.xml Wed Aug 31 13:29:33 2005
@@ -35,25 +35,26 @@
                Default space pattern
           </fo:block>
           <fo:block>
-            <fo:leader leader-pattern="space" leader-pattern-width="use-font-metrics"/>
-                leader-pattern-width="use-font-metrics"
+            <fo:leader leader-pattern="space" leader-length="0.5in"/>
+               leader-length="0.5in"
           </fo:block>
           <fo:block>
-            <fo:leader leader-pattern="space" leader-length="20mm" leader-pattern-width="5mm"/>
-                 leader-length="20mm" leader-pattern-width="5mm"
-          </fo:block>
-          <fo:block>
-            <fo:leader leader-pattern="space" leader-pattern-width="1pt"/>
-                leader-pattern-width="1pt"
-          </fo:block>
-          <fo:block>
-            <fo:leader leader-pattern="space" leader-pattern-width="5%"/>
-                leader-pattern-width="5%"
+            <fo:leader leader-pattern="space" leader-length="5%"/>
+               leader-length="5%"
           </fo:block>
         </fo:flow>
       </fo:page-sequence>
     </fo:root>
   </fo>
   <checks>
+    <eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[1]/lineArea/@ipd"/>
+    <eval expected="12000" xpath="//flow/block[1]/lineArea/space/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[2]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[2]/lineArea/@ipd"/>
+    <eval expected="36000" xpath="//flow/block[2]/lineArea/space/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[3]/lineArea/@bpd"/>
+    <eval expected="360000" xpath="//flow/block[3]/lineArea/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[3]/lineArea/space/@ipd"/>
   </checks>
 </testcase>

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-use-content.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-use-content.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-use-content.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-use-content.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,59 @@
+<?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 leaders with leader-pattern="use-content"
+    </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>
+            <fo:leader leader-pattern="use-content"/>
+               Default dots pattern
+          </fo:block>
+          <fo:block>
+            <fo:leader leader-pattern="use-content" leader-pattern-width="use-font-metrics"/>
+                leader-pattern-width="use-font-metrics"
+          </fo:block>
+          <fo:block>
+            <fo:leader leader-pattern="use-content" leader-length="20mm" leader-pattern-width="5mm"/>
+                 leader-length="20mm" leader-pattern-width="5mm"
+          </fo:block>
+          <fo:block>
+            <fo:leader leader-pattern="use-content" leader-pattern-width="1pt"/>
+                leader-pattern-width="1pt"
+          </fo:block>
+          <fo:block>
+            <fo:leader leader-pattern="use-content" leader-pattern-width="5%"/>
+                leader-pattern-width="5%"
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/leader-use-content.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/line-height.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/line-height.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/line-height.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/line-height.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,74 @@
+<?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 line height and its special inheritance behaviour
+    </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 line-height="normal" background-color="yellow">line-height="normal"
+            <fo:block font-size="larger" margin-left="10pt" background-color="blue">font-size="larger" - line height grows</fo:block>
+            <fo:block font-size="smaller" margin-left="10pt" background-color="red">font-size="smaller" - line height shrinks</fo:block>
+          </fo:block>
+          <fo:block line-height="150%" background-color="yellow">line-height="150%"
+            <fo:block font-size="larger" margin-left="10pt" background-color="blue">font-size="larger" - line height same as above</fo:block>
+            <fo:block font-size="smaller" margin-left="10pt" background-color="red">font-size="smaller" - line height same as above</fo:block>
+          </fo:block>
+          <fo:block line-height="20pt" background-color="yellow">line-height="20pt"
+            <fo:block font-size="larger" margin-left="10pt" background-color="blue">font-size="larger" - line height same as above</fo:block>
+            <fo:block font-size="smaller" margin-left="10pt" background-color="red">font-size="smaller" - line height same as above</fo:block>
+          </fo:block>
+          <fo:block line-height="1.5" background-color="yellow">line-height="1.5"
+            <fo:block font-size="larger" margin-left="10pt" background-color="blue">font-size="larger" - line height grows</fo:block>
+            <fo:block font-size="smaller" margin-left="10pt" background-color="red">font-size="smaller" - line height shrinks</fo:block>
+          </fo:block>
+          <fo:block line-height="150% - 5pt" background-color="yellow">line-height="150% - 5pt"
+            <fo:block font-size="larger" margin-left="10pt" background-color="blue">font-size="larger" - line height same as above</fo:block>
+            <fo:block font-size="smaller" margin-left="10pt" background-color="red">font-size="smaller" - line height same as above</fo:block>
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="14400" xpath="//flow/block[1]/lineArea/@bpd"/>
+    <eval expected="17280" xpath="//flow/block[1]/block[1]/lineArea/@bpd"/>
+    <eval expected="12000" xpath="//flow/block[1]/block[2]/lineArea/@bpd"/>
+    <eval expected="18000" xpath="//flow/block[2]/lineArea/@bpd"/>
+    <eval expected="18000" xpath="//flow/block[2]/block[1]/lineArea/@bpd"/>
+    <eval expected="18000" xpath="//flow/block[2]/block[2]/lineArea/@bpd"/>
+    <eval expected="20000" xpath="//flow/block[3]/lineArea/@bpd"/>
+    <eval expected="20000" xpath="//flow/block[3]/block[1]/lineArea/@bpd"/>
+    <eval expected="20000" xpath="//flow/block[3]/block[2]/lineArea/@bpd"/>
+    <eval expected="18000" xpath="//flow/block[4]/lineArea/@bpd"/>
+    <eval expected="21600" xpath="//flow/block[4]/block[1]/lineArea/@bpd"/>
+    <eval expected="15000" xpath="//flow/block[4]/block[2]/lineArea/@bpd"/>
+    <eval expected="13000" xpath="//flow/block[5]/lineArea/@bpd"/>
+    <eval expected="13000" xpath="//flow/block[5]/block[1]/lineArea/@bpd"/>
+    <eval expected="13000" xpath="//flow/block[5]/block[2]/lineArea/@bpd"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/line-height.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-block1.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-block1.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-block1.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-block1.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,63 @@
+<?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 margin percentages on fo:block.
+    </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 margin="5%" background-color="yellow">
+            <fo:block margin="5%" background-color="blue">
+               margin="5%" - should have the slightly smaller margin than the enclosing block
+            </fo:block>
+          </fo:block>
+          <fo:block>Yellow block has margin="5%" - 18pt margin based on 5in page width</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="0" xpath="//flow/block[1]/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[1]/@bpd"/>
+    <eval expected="324000" xpath="//flow/block[2]/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[2]/@start-indent"/>
+    <eval expected="18000" xpath="//flow/block[2]/@end-indent"/>
+    <eval expected="18000" xpath="//flow/block[2]/@space-start"/>
+    <eval expected="18000" xpath="//flow/block[2]/@space-end"/>
+    <eval expected="0" xpath="//flow/block[2]/block[1]/@ipd"/>
+    <eval expected="16200" xpath="//flow/block[2]/block[1]/@bpd"/>
+    <eval expected="291600" xpath="//flow/block[2]/block[2]/@ipd"/>
+    <eval expected="34200" xpath="//flow/block[2]/block[2]/@start-indent"/>
+    <eval expected="34200" xpath="//flow/block[2]/block[2]/@end-indent"/>
+    <eval expected="34200" xpath="//flow/block[2]/block[2]/@space-start"/>
+    <eval expected="34200" xpath="//flow/block[2]/block[2]/@space-end"/>
+    <eval expected="0" xpath="//flow/block[2]/block[3]/@ipd"/>
+    <eval expected="16200" xpath="//flow/block[2]/block[3]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[3]/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[3]/@bpd"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-block1.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-block2.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-block2.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-block2.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-block2.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,63 @@
+<?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 margin percentages on fo:block with explict inheritance.
+    </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 margin="5%" background-color="yellow">
+            <fo:block margin="inherit" background-color="blue">
+               margin="inherit" - should have the same margin as the enclosing block
+            </fo:block>
+          </fo:block>
+          <fo:block>Yellow block has margin="5%" - 18pt margin based on 5in page width</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="0" xpath="//flow/block[1]/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[1]/@bpd"/>
+    <eval expected="324000" xpath="//flow/block[2]/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[2]/@start-indent"/>
+    <eval expected="18000" xpath="//flow/block[2]/@end-indent"/>
+    <eval expected="18000" xpath="//flow/block[2]/@space-start"/>
+    <eval expected="18000" xpath="//flow/block[2]/@space-end"/>
+    <eval expected="0" xpath="//flow/block[2]/block[1]/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[2]/block[1]/@bpd"/>
+    <eval expected="288000" xpath="//flow/block[2]/block[2]/@ipd"/>
+    <eval expected="36000" xpath="//flow/block[2]/block[2]/@start-indent"/>
+    <eval expected="36000" xpath="//flow/block[2]/block[2]/@end-indent"/>
+    <eval expected="36000" xpath="//flow/block[2]/block[2]/@space-start"/>
+    <eval expected="36000" xpath="//flow/block[2]/block[2]/@space-end"/>
+    <eval expected="0" xpath="//flow/block[2]/block[3]/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[2]/block[3]/@bpd"/>
+    <eval expected="0" xpath="//flow/block[3]/@ipd"/>
+    <eval expected="18000" xpath="//flow/block[3]/@bpd"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-block2.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region1.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region1.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region1.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region1.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,106 @@
+<?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%">
+          <fo:region-body margin="5%" background-color="yellow" />
+          <fo:region-before extent="5%" 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="5%" 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% margins on all regions and the page master.
+            The page size is 5in x 3in. This gives top and bottom margins of 0.25in and
+            left and right margins 0.15in.
+          </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="18000" xpath="//page/regionViewport[1]/@bpd"/>
+    <eval expected="10800 18000 194400 18000" xpath="//page/regionViewport[1]/@rect"/>
+    <eval expected="194400" xpath="//page/regionViewport[1]/regionBefore/@ipd"/>
+    <eval expected="18000" xpath="//page/regionViewport[1]/regionBefore/@bpd"/>
+    <!-- region start -->
+    <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/>
+    <eval expected="10800" xpath="//page/regionViewport[2]/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[2]/@bpd"/>
+    <eval expected="10800 36000 10800 288000" xpath="//page/regionViewport[2]/@rect"/>
+    <eval expected="10800" xpath="//page/regionViewport[2]/regionStart/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[2]/regionStart/@bpd"/>
+    <!-- region end -->
+    <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/>
+    <eval expected="10800" xpath="//page/regionViewport[3]/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[3]/@bpd"/>
+    <eval expected="194400 36000 10800 288000" xpath="//page/regionViewport[3]/@rect"/>
+    <eval expected="10800" xpath="//page/regionViewport[3]/regionEnd/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/>
+    <!-- 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"/>
+    <!-- region body -->
+    <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/>
+    <eval expected="172800" xpath="//page/regionViewport[5]/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[5]/@bpd"/>
+    <eval expected="21600 36000 172800 288000" xpath="//page/regionViewport[5]/@rect"/>
+    <eval expected="172800" xpath="//page/regionViewport[5]/regionBody/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[5]/regionBody/@bpd"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region1.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region2.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region2.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region2.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region2.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,107 @@
+<?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="5%" background-color="yellow" />
+          <fo:region-before extent="5%" 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="5%" 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% margins on all regions and the page master with a
+            landscape reference orientation.
+            The page size is 5in x 3in. This gives top and bottom margins of 0.25in and
+            left and right margins 0.15in.
+          </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="18000" xpath="//page/regionViewport[1]/@bpd"/>
+    <eval expected="10800 18000 18000 324000" xpath="//page/regionViewport[1]/@rect"/>
+    <eval expected="324000" xpath="//page/regionViewport[1]/regionBefore/@ipd"/>
+    <eval expected="18000" xpath="//page/regionViewport[1]/regionBefore/@bpd"/>
+    <!-- region start -->
+    <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/>
+    <eval expected="10800" xpath="//page/regionViewport[2]/@ipd"/>
+    <eval expected="158400" xpath="//page/regionViewport[2]/@bpd"/>
+    <eval expected="28800 331200 158400 10800" xpath="//page/regionViewport[2]/@rect"/>
+    <eval expected="10800" xpath="//page/regionViewport[2]/regionStart/@ipd"/>
+    <eval expected="158400" xpath="//page/regionViewport[2]/regionStart/@bpd"/>
+    <!-- region end -->
+    <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/>
+    <eval expected="10800" xpath="//page/regionViewport[3]/@ipd"/>
+    <eval expected="158400" xpath="//page/regionViewport[3]/@bpd"/>
+    <eval expected="28800 18000 158400 10800" xpath="//page/regionViewport[3]/@rect"/>
+    <eval expected="10800" xpath="//page/regionViewport[3]/regionEnd/@ipd"/>
+    <eval expected="158400" xpath="//page/regionViewport[3]/regionEnd/@bpd"/>
+    <!-- region after -->
+    <eval expected="color=#008000" xpath="//page/regionViewport[4]/@background"/>
+    <eval expected="324000" xpath="//page/regionViewport[4]/@ipd"/>
+    <eval expected="18000" xpath="//page/regionViewport[4]/@bpd"/>
+    <eval expected="187200 18000 18000 324000" xpath="//page/regionViewport[4]/@rect"/>
+    <eval expected="324000" xpath="//page/regionViewport[4]/regionAfter/@ipd"/>
+    <eval expected="18000" xpath="//page/regionViewport[4]/regionAfter/@bpd"/>
+    <!-- region body -->
+    <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/>
+    <eval expected="302400" xpath="//page/regionViewport[5]/@ipd"/>
+    <eval expected="158400" xpath="//page/regionViewport[5]/@bpd"/>
+    <eval expected="28800 28800 158400 302400" xpath="//page/regionViewport[5]/@rect"/>
+    <eval expected="302400" xpath="//page/regionViewport[5]/regionBody/@ipd"/>
+    <eval expected="158400" xpath="//page/regionViewport[5]/regionBody/@bpd"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region2.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region3.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region3.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region3.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region3.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,109 @@
+<?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 regions (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%" writing-mode="rl">
+          <fo:region-body margin-top="5%" margin-bottom="5%" margin-left="5%" margin-right="10%" background-color="yellow" />
+          <fo:region-before extent="5%" background-color="blue" precedence="true" />
+          <fo:region-after extent="5%" background-color="green" precedence="true" />
+          <fo:region-start extent="10%" background-color="red" />
+          <fo:region-end extent="5%" 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% margins on all regions and the page master.
+            The page size is 5in x 3in. This gives top and bottom margins of 0.25in and
+            left and right margins 0.15in.
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <!-- The values in these checks are currently not correct. However, there is also a bug
+    in the rl writing mode causing a swap of left and right margin. Both should be fixed at
+    the same time. -->
+    <!-- region before -->
+    <eval expected="color=#0000ff" xpath="//page/regionViewport[1]/@background"/>
+    <eval expected="194400" xpath="//page/regionViewport[1]/@ipd"/>
+    <eval expected="18000" xpath="//page/regionViewport[1]/@bpd"/>
+    <eval expected="10800 18000 194400 18000" xpath="//page/regionViewport[1]/@rect"/>
+    <eval expected="194400" xpath="//page/regionViewport[1]/regionBefore/@ipd"/>
+    <eval expected="18000" xpath="//page/regionViewport[1]/regionBefore/@bpd"/>
+    <!-- region start -->
+    <eval expected="color=#ff0000" xpath="//page/regionViewport[2]/@background"/>
+    <eval expected="10800" xpath="//page/regionViewport[2]/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[2]/@bpd"/>
+    <eval expected="10800 36000 10800 288000" xpath="//page/regionViewport[2]/@rect"/>
+    <eval expected="10800" xpath="//page/regionViewport[2]/regionStart/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[2]/regionStart/@bpd"/>
+    <!-- region end -->
+    <eval expected="color=#ffa500" xpath="//page/regionViewport[3]/@background"/>
+    <eval expected="10800" xpath="//page/regionViewport[3]/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[3]/@bpd"/>
+    <eval expected="194400 36000 10800 288000" xpath="//page/regionViewport[3]/@rect"/>
+    <eval expected="10800" xpath="//page/regionViewport[3]/regionEnd/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[3]/regionEnd/@bpd"/>
+    <!-- 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"/>
+    <!-- region body -->
+    <eval expected="color=#ffff00" xpath="//page/regionViewport[5]/@background"/>
+    <eval expected="172800" xpath="//page/regionViewport[5]/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[5]/@bpd"/>
+    <eval expected="21600 36000 172800 288000" xpath="//page/regionViewport[5]/@rect"/>
+    <eval expected="172800" xpath="//page/regionViewport[5]/regionBody/@ipd"/>
+    <eval expected="288000" xpath="//page/regionViewport[5]/regionBody/@bpd"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/margin-region3.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-block-container1.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-block-container1.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-block-container1.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-block-container1.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,53 @@
+<?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 padding on block containers.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block-container width="2in" height="1in" background-color="yellow" padding="5%">
+             <fo:block>margin not specified padding="5%" on this 2x1in yellow container</fo:block>
+          </fo:block-container>
+          <fo:block-container width="2in" height="1in" margin="0pt" background-color="blue" padding="5%">
+             <fo:block>margin="0pt" padding="5%" on this 2x1in blue container</fo:block>
+          </fo:block-container>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="18000 18000 18000 18000" xpath="//flow/block[1]/@bap"/>
+    <eval expected="-18000" xpath="//flow/block[1]/@space-start"/>
+    <eval expected="-18000" xpath="//flow/block[1]/@space-end"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[1]/@background"/>
+    <eval expected="18000 18000 18000 18000" xpath="//flow/block[2]/@bap"/>
+    <eval expected="18000" xpath="//flow/block[2]/@start-indent"/>
+    <eval expected="18000" xpath="//flow/block[2]/@end-indent"/>
+    <eval expected="color=#0000ff" xpath="//flow/block[2]/@background"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-block-container1.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-block1.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-block1.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-block1.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-block1.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,53 @@
+<?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 padding on blocks.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block background-color="yellow" padding="5%">
+             margin not specified padding="5%"
+          </fo:block>
+          <fo:block margin="0pt" background-color="yellow" padding="5%">
+             margin="0pt" padding="5%"
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="18000 18000 18000 18000" xpath="//flow/block[1]/@bap"/>
+    <eval expected="-18000" xpath="//flow/block[1]/@space-start"/>
+    <eval expected="-18000" xpath="//flow/block[1]/@space-end"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[1]/@background"/>
+    <eval expected="18000 18000 18000 18000" xpath="//flow/block[2]/@bap"/>
+    <eval expected="18000" xpath="//flow/block[2]/@start-indent"/>
+    <eval expected="18000" xpath="//flow/block[2]/@end-indent"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[2]/@background"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-block1.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-list1.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-list1.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-list1.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-list1.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,75 @@
+<?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 padding on lists (list-block).
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:list-block provisional-distance-between-starts="1in" provisional-label-separation="0.1in" margin="0pt" padding="5%" background-color="yellow">
+            <fo:list-item background-color="white">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>label 1</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>
+                  body 1: The whole list should have a 5% padding shown in yellow.
+                </fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+            <fo:list-item background-color="white">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>label 2</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>
+                  body 2: The whole list should have a 5% padding shown in yellow.
+                </fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+            <fo:list-item background-color="white">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>label 3</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>
+                  body 3: The whole list should have a 5% padding shown in yellow.
+                </fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+          </fo:list-block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="18000 18000 18000 18000" xpath="//flow/block/@bap"/>
+    <eval expected="18000" xpath="//flow/block/@start-indent"/>
+    <eval expected="18000" xpath="//flow/block/@end-indent"/>
+    <eval expected="color=#ffff00" xpath="//flow/block/@background"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-list1.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-list2.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-list2.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-list2.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-list2.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,78 @@
+<?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 padding widths on lists (list-item).
+    </p>
+  </info>
+  <variables>
+    <img>../../resources/images/bgimg300dpi.jpg</img>
+  </variables>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:list-block provisional-distance-between-starts="1in" provisional-label-separation="0.1in">
+            <fo:list-item margin="0pt" padding="5%" background-color="yellow">
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>label 1</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>
+                  body 1: We should have 5% padding around this whole yellow list item.
+                </fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+            <fo:list-item>
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>label 2</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>
+                  body 2: We should have no padding around this whole list item.
+                </fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+            <fo:list-item>
+              <fo:list-item-label end-indent="label-end()">
+                <fo:block>label 3</fo:block>
+              </fo:list-item-label>
+              <fo:list-item-body start-indent="body-start()">
+                <fo:block>
+                  body 3: We should have no padding around this whole list item.
+                </fo:block>
+              </fo:list-item-body>
+            </fo:list-item>
+          </fo:list-block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="18000 18000 18000 18000" xpath="//flow/block/block/@bap"/>
+    <eval expected="18000" xpath="//flow/block/block/@start-indent"/>
+    <eval expected="18000" xpath="//flow/block/block/@end-indent"/>
+    <eval expected="color=#ffff00" xpath="//flow/block/block/@background"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-list2.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-table1.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-table1.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-table1.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-table1.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,74 @@
+<?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 padding on a fo:table.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:table margin="0pt" padding="5%" background-color="yellow" border-collapse="separate">
+            <fo:table-column column-number="1" />
+            <fo:table-column column-number="2" />
+            <fo:table-column column-number="3" />
+            <fo:table-header>
+              <fo:table-row>
+                <fo:table-cell>
+                  <fo:block>Header Col 1</fo:block>
+                </fo:table-cell>
+                <fo:table-cell>
+                  <fo:block>Header Col 2</fo:block>
+                </fo:table-cell>
+                <fo:table-cell>
+                  <fo:block>Header Col 3</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+            </fo:table-header>
+            <fo:table-body>
+              <fo:table-row>
+                <fo:table-cell>
+                  <fo:block>Row 1 Col 1</fo:block>
+                </fo:table-cell>
+                <fo:table-cell>
+                  <fo:block>Row 1 Col 2</fo:block>
+                </fo:table-cell>
+                <fo:table-cell>
+                  <fo:block>Row 1 Col 3</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+            </fo:table-body>
+          </fo:table>
+          <fo:block>Table on yellow background with 5% padding</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="18000" xpath="//flow/block/@start-indent"/>
+    <eval expected="18000" xpath="//flow/block/@end-indent"/>
+    <eval expected="color=#ffff00" xpath="//flow/block/@background"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-table1.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-table2.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-table2.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-table2.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-table2.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,64 @@
+<?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 padding on a fo:table-cell.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:table>
+            <fo:table-column column-number="1" />
+            <fo:table-column column-number="2" />
+            <fo:table-column column-number="3" />
+            <fo:table-body>
+              <fo:table-row>
+                <fo:table-cell>
+                  <fo:block>Row 1 Col 1</fo:block>
+                </fo:table-cell>
+                <fo:table-cell margin="0pt" padding="2%" background-color="yellow">
+                  <fo:block>Row 1 Col 2</fo:block>
+                </fo:table-cell>
+                <fo:table-cell>
+                  <fo:block>Row 1 Col 3</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+            </fo:table-body>
+          </fo:table>
+          <fo:block>Table a yellow cell having 2% padding.</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="7200 7200 7200 7200" xpath="//flow/block/block[2]/@bap"/>
+    <eval expected="color=#ffff00" xpath="//flow/block/block[2]/@background"/>
+    <eval expected="7200" xpath="//flow/block/block[2]/block/@start-indent"/>
+    <eval expected="7200" xpath="//flow/block/block[2]/block/@end-indent"/>
+    <eval expected="7200" xpath="//flow/block/block[2]/block/@space-start"/>
+    <eval expected="7200" xpath="//flow/block/block[2]/block/@space-end"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/padding-table2.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/testcases/table3.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/table3.xml?rev=265577&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/table3.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/table3.xml Wed Aug 31 13:29:33 2005
@@ -0,0 +1,79 @@
+<?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 basic tables with percentages in cells.
+    </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:table table-layout="fixed" width="100%">
+            <fo:table-column column-width="2in"/>
+            <fo:table-column column-width="3in"/>
+            <fo:table-body>
+              <fo:table-row>
+                <fo:table-cell>
+                  <fo:block margin="10%">cell1</fo:block>
+                </fo:table-cell>
+                <fo:table-cell background-color="yellow">
+                  <fo:block margin-left="5%" margin-right="5%">cell2</fo:block>
+                </fo:table-cell>
+              </fo:table-row>
+            </fo:table-body>
+          </fo:table>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <!-- table dimensions -->
+    <eval expected="360000" xpath="//flow/block[1]/@ipd"/>
+    <eval expected="43200" xpath="//flow/block[1]/@bpd"/>
+    
+    <!-- cell 1 -->
+    <true xpath="//flow/block[1]/block[1]/@is-reference-area"/>
+    <eval expected="144000" xpath="//flow/block[1]/block[1]/@ipd"/>
+    <eval expected="43200" xpath="//flow/block[1]/block[1]/@bpd"/>
+    <eval expected="115200" xpath="//flow/block[1]/block[1]/block[2]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[2]/@bpd"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[2]/@start-indent"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[2]/@space-start"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[2]/@end-indent"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[1]/block[2]/@space-end"/>
+
+    <!-- cell 2 -->
+    <true xpath="//flow/block[1]/block[2]/@is-reference-area"/>
+    <eval expected="144000" xpath="//flow/block[1]/block[2]/@left-offset"/>
+    <eval expected="216000" xpath="//flow/block[1]/block[2]/@ipd"/>
+    <eval expected="43200" xpath="//flow/block[1]/block[2]/@bpd"/>
+    <eval expected="194400" xpath="//flow/block[1]/block[2]/block[1]/@ipd"/>
+    <eval expected="14400" xpath="//flow/block[1]/block[2]/block[1]/@bpd"/>
+    <eval expected="10800" xpath="//flow/block[1]/block[2]/block[1]/@start-indent"/>
+    <eval expected="10800" xpath="//flow/block[1]/block[2]/block[1]/@space-start"/>
+    <eval expected="10800" xpath="//flow/block[1]/block[2]/block[1]/@end-indent"/>
+    <eval expected="10800" xpath="//flow/block[1]/block[2]/block[1]/@space-end"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/testcases/table3.xml
------------------------------------------------------------------------------
    svn:keywords = Id



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org