From: Manuel Mall Date: Wed, 12 Oct 2005 16:11:47 +0000 (+0000) Subject: Fixed incorrect IPD for blocks nested in inlines and added IPD adjustment for inlineb... X-Git-Tag: fop-0_90-alpha1~142 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7fd03980fea71edc28578218f3a53ca0665698df;p=xmlgraphics-fop.git Fixed incorrect IPD for blocks nested in inlines and added IPD adjustment for inlineblockparents with borders when rendering git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@314953 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java index cd7d962c8..fdfcca373 100755 --- a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java @@ -235,12 +235,12 @@ public class InlineLayoutManager extends InlineStackingLayoutManager { 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 @@ public class InlineLayoutManager extends InlineStackingLayoutManager { // 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 diff --git a/src/java/org/apache/fop/render/AbstractRenderer.java b/src/java/org/apache/fop/render/AbstractRenderer.java index eda205d94..16c8f75ae 100644 --- a/src/java/org/apache/fop/render/AbstractRenderer.java +++ b/src/java/org/apache/fop/render/AbstractRenderer.java @@ -659,6 +659,7 @@ public abstract class AbstractRenderer * @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()); diff --git a/test/layoutengine/testcases/inline_border_padding_block_nested.xml b/test/layoutengine/testcases/inline_border_padding_block_nested.xml index 4536cb0dd..81c340bd5 100755 --- a/test/layoutengine/testcases/inline_border_padding_block_nested.xml +++ b/test/layoutengine/testcases/inline_border_padding_block_nested.xml @@ -83,15 +83,14 @@ - + - - - + + @@ -101,7 +100,6 @@ - @@ -119,7 +117,6 @@ - @@ -134,7 +131,6 @@ -