]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Show and fix a bug where bottom/right positioning of block-containers didn't work...
authorJeremias Maerki <jeremias@apache.org>
Sun, 21 Aug 2005 14:09:25 +0000 (14:09 +0000)
committerJeremias Maerki <jeremias@apache.org>
Sun, 21 Aug 2005 14:09:25 +0000 (14:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@234203 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
test/layoutengine/testcases/block-container-abs1.xml

index d1f656b58f3a231390cd1ff5867fd2da029a9608..feec2f78365cc00f34c4eadb725bb420333bf5e2 100644 (file)
@@ -302,6 +302,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
                 // curLM is a ?
                 //childLC.setStackLimit(MinOptMax.subtract(context
                 //        .getStackLimit(), stackSize));
+                childLC.setStackLimit(context.getStackLimit());
                 childLC.setRefIPD(referenceIPD);
             }
 
index 37c22025289722173830db213f44f715f6f73cc7..10e34f67c851f27d7d20133b08a8494dc81f830c 100644 (file)
@@ -43,6 +43,9 @@
             This is some background-text. 
             This is some background-text. 
             This is some background-text. 
+            <fo:block-container left="100pt" top="100pt" right="100pt" bottom="100pt" absolute-position="absolute" background-color="orange" color="black">
+              <fo:block background-color="yellow">absolutely positioned right/bottom (inside a block)</fo:block>
+            </fo:block-container>
             This is some background-text. 
             This is some background-text. 
             This is some background-text.
@@ -66,7 +69,7 @@
     <eval expected="216000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/block[1]/block[1]/@ipda"/>
 
     <!-- *** second block-container *** -->
-    <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[1]/@is-viewport-area"/>
+    <true xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@is-viewport-area"/>
     <eval expected="absolute" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@positioning"/>
     <eval expected="340000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@ipd"/>
     <eval expected="340000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/@ipda"/>
     <!--   -> containing block (skipping dummy block)-->
     <eval expected="340000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/block[1]/@ipd"/>
     <eval expected="340000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/regionBody/mainReference/span/flow/block[2]/block[1]/block[1]/@ipda"/>
+
+    <!-- *** third block-container *** -->
+    <true xpath="//flow/block[3]/block[1]/@is-viewport-area"/>
+    <eval expected="absolute" xpath="//flow/block[3]/block[1]/@positioning"/>
+    <eval expected="160000" xpath="//flow/block[3]/block[1]/@ipd"/>
+    <eval expected="160000" xpath="//flow/block[3]/block[1]/@ipda"/>
+    <eval expected="160000" xpath="//flow/block[3]/block[1]/@bpd"/>
+    <eval expected="160000" xpath="//flow/block[3]/block[1]/@bpda"/>
+    <eval expected="100000" xpath="//flow/block[3]/block[1]/@left-position"/>
+    <eval expected="100000" xpath="//flow/block[3]/block[1]/@top-position"/>
+
   </checks>
 </testcase>