xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From man...@apache.org
Subject svn commit: r314953 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java src/java/org/apache/fop/render/AbstractRenderer.java test/layoutengine/testcases/inline_border_padding_block_nested.xml
Date Wed, 12 Oct 2005 16:11:57 GMT
Author: manuel
Date: Wed Oct 12 09:11:47 2005
New Revision: 314953

URL: http://svn.apache.org/viewcvs?rev=314953&view=rev
Log:
Fixed incorrect IPD for blocks nested in inlines and added IPD adjustment for inlineblockparents
with borders when rendering

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java
    xmlgraphics/fop/trunk/test/layoutengine/testcases/inline_border_padding_block_nested.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java?rev=314953&r1=314952&r2=314953&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
Wed Oct 12 09:11:47 2005
@@ -235,12 +235,12 @@
 
         if (borderProps != null) {
             childLC.setLineStartBorderAndPaddingWidth(context.getLineStartBorderAndPaddingWidth()
-                + borderProps.getPadding(CommonBorderPaddingBackground.START, true, this)
-                + borderProps.getBorderWidth(CommonBorderPaddingBackground.START, true)
+                + borderProps.getPaddingStart(true, this)
+                + borderProps.getBorderStartWidth(true)
              );
             childLC.setLineEndBorderAndPaddingWidth(context.getLineEndBorderAndPaddingWidth()
-                + borderProps.getPadding(CommonBorderPaddingBackground.END, true, this)
-                + borderProps.getBorderWidth(CommonBorderPaddingBackground.END, true)
+                + borderProps.getPaddingEnd(true, this)
+                + borderProps.getBorderEndWidth(true)
              );
         }
         
@@ -250,7 +250,10 @@
                 // Leave room for start/end border and padding
                 if (borderProps != null) {
                     childLC.setRefIPD(childLC.getRefIPD()
-                            - borderProps.getIPPaddingAndBorder(false, this));
+                            - borderProps.getPaddingStart(lastChildLM != null, this)
+                            - borderProps.getBorderStartWidth(lastChildLM != null)
+                            - borderProps.getPaddingEnd(hasNextChildLM(), this)
+                            - borderProps.getBorderEndWidth(hasNextChildLM()));
                 }
             }
             // get KnuthElements from curLM

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java?rev=314953&r1=314952&r2=314953&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java Wed Oct 12
09:11:47 2005
@@ -659,6 +659,7 @@
      * @param ibp the inline block parent to render
      */
     protected void renderInlineBlockParent(InlineBlockParent ibp) {
+        currentIPPosition += ibp.getBorderAndPaddingWidthStart();
         // For inline content the BP position is updated by the enclosing line area
         int saveBP = currentBPPosition;
         renderBlock(ibp.getChildArea());

Modified: xmlgraphics/fop/trunk/test/layoutengine/testcases/inline_border_padding_block_nested.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/testcases/inline_border_padding_block_nested.xml?rev=314953&r1=314952&r2=314953&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/testcases/inline_border_padding_block_nested.xml
(original)
+++ xmlgraphics/fop/trunk/test/layoutengine/testcases/inline_border_padding_block_nested.xml
Wed Oct 12 09:11:47 2005
@@ -83,15 +83,14 @@
   <checks>
     <eval expected="347000" xpath="//flow/block[2]/lineArea[2]/inlineblockparent/@ipd"/>
     <eval expected="350000" xpath="//flow/block[2]/lineArea[2]/inlineblockparent/@ipda"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[1]/inlineblockparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineblockparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineblockparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[2]/inlineblockparent/@border-start"/>
     <eval expected="2000" xpath="//flow/block[2]/lineArea[2]/inlineblockparent/@padding-after"/>
     <eval expected="2000" xpath="//flow/block[2]/lineArea[2]/inlineblockparent/@padding-before"/>
     <eval expected="2000" xpath="//flow/block[2]/lineArea[2]/inlineblockparent/@padding-start"/>
-    <eval expected="48910" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="51910" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="1375" xpath="//flow/block[2]/lineArea[3]/inlineparent/@offset"/>
+    <eval expected="46130" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipd"/>
+    <eval expected="49130" xpath="//flow/block[2]/lineArea[3]/inlineparent/@ipda"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[2]/lineArea[3]/inlineparent/@border-end"/>
@@ -101,7 +100,6 @@
 
     <eval expected="54470" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipd"/>
     <eval expected="57470" xpath="//flow/block[5]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="1375" xpath="//flow/block[5]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[5]/lineArea[1]/inlineparent/@border-start"/>
@@ -119,7 +117,6 @@
     
     <eval expected="54470" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipd"/>
     <eval expected="57470" xpath="//flow/block[8]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="1375" xpath="//flow/block[8]/lineArea[1]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[1]/inlineparent/@border-start"/>
@@ -134,7 +131,6 @@
     <eval expected="1000" xpath="//flow/block[8]/lineArea[2]/inlineblockparent/@padding-before"/>
     <eval expected="46130" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipd"/>
     <eval expected="49130" xpath="//flow/block[8]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="1375" xpath="//flow/block[8]/lineArea[3]/inlineparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[8]/lineArea[3]/inlineparent/@border-end"/>



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


Mime
View raw message