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 sp...@apache.org on 2008/02/08 11:06:08 UTC

svn commit: r619819 - in /xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking: src/java/org/apache/fop/layoutmgr/ src/java/org/apache/fop/layoutmgr/inline/ test/layoutengine/standard-testcases/

Author: spepping
Date: Fri Feb  8 02:06:06 2008
New Revision: 619819

URL: http://svn.apache.org/viewvc?rev=619819&view=rev
Log:
Border and padding of inlines with nested blocks is now added to the
first or last paragraph of the first or last nested block

Added:
    xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/inline_border_padding_block_nested_3.xml   (with props)
Modified:
    xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java
    xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java
    xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/KnuthSequence.java
    xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
    xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
    xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/KnuthParagraph.java
    xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java?rev=619819&r1=619818&r2=619819&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/BlockKnuthSequence.java Fri Feb  8 02:06:06 2008
@@ -21,10 +21,12 @@
 
 import java.util.LinkedList;
 import java.util.List;
+import java.util.ListIterator;
 import java.util.Stack;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.fop.layoutmgr.inline.KnuthParagraph;
 import org.apache.fop.layoutmgr.list.LineBreakingListElement;
 
 /**
@@ -91,6 +93,74 @@
     public KnuthSequence endSequence() {
         isClosed = true;
         return this;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.fop.layoutmgr.KnuthSequence#addKnuthElementForBorderPaddingStart(org.apache.fop.layoutmgr.KnuthElement)
+     */
+    public void addKnuthElementForBorderPaddingStart(KnuthBox bap) {
+        ListIterator iter = listIterator();
+        ParagraphListElement parale = null;
+        while (iter.hasNext()) {
+            ListElement le = (ListElement) iter.next();
+            if (le instanceof ParagraphListElement) {
+                parale = (ParagraphListElement) le;
+                break;
+            }
+        }
+        if (parale == null) {
+            log.debug("Failed to add border and padding: block sequence contains no paragraph");
+            return;
+        }
+
+        KnuthParagraph par = parale.getPara();
+        Position newPos;
+        KnuthElement firstElt = (KnuthElement) par.get(par.getIgnoreAtStart());
+        Position firstPos = firstElt.getPosition();
+        LayoutManager firstLM = firstPos.getLM();
+        if (firstPos instanceof NonLeafPosition) {
+            Position firstSubPos = firstPos.getPosition();
+            newPos = new NonLeafPosition(firstLM, firstSubPos);
+        } else {
+            newPos = new LeafPosition(firstLM, -1);
+        }
+        bap.setPosition(newPos);
+        par.addKnuthElementForBorderPaddingStart(bap);
+        ElementListObserver.observe(par, "line", "added-bap-start");
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.fop.layoutmgr.KnuthSequence#addKnuthElementForBorderPaddingEnd(org.apache.fop.layoutmgr.KnuthElement)
+     */
+    public void addKnuthElementForBorderPaddingEnd(KnuthBox bap) {
+        ListIterator iter = listIterator(size());
+        ParagraphListElement parale = null;
+        while (iter.hasPrevious()) {
+            ListElement le = (ListElement) iter.previous();
+            if (le instanceof ParagraphListElement) {
+                parale = (ParagraphListElement) le;
+                break;
+            }
+        }
+        if (parale == null) {
+            log.debug("Failed to add border and padding: block sequence contains no paragraph");
+            return;
+        }
+        
+        KnuthParagraph par = parale.getPara();
+        Position newPos;
+        KnuthElement lastElt = (KnuthElement) par.get(par.size() - 1 - par.getIgnoreAtEnd());
+        Position lastPos = lastElt.getPosition();
+        LayoutManager lastLM = lastPos.getLM();
+        if (lastPos instanceof NonLeafPosition) {
+            Position lastSubPos = lastPos.getPosition();
+            newPos = new NonLeafPosition(lastLM, lastSubPos);
+        } else {
+            newPos = new LeafPosition(lastLM, -1);
+        }
+        bap.setPosition(newPos);
+        par.addKnuthElementForBorderPaddingEnd(bap);
+        ElementListObserver.observe(par, "line", "added-bap-end");
     }
 
     public class SubSequence {

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java?rev=619819&r1=619818&r2=619819&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java Fri Feb  8 02:06:06 2008
@@ -32,6 +32,11 @@
  */
 public class InlineKnuthSequence extends KnuthSequence  {
 
+    /** Number of elements to ignore at the beginning of the list. */ 
+    private int ignoreAtStart = 0;
+    /** Number of elements to ignore at the end of the list. */
+    private int ignoreAtEnd = 0;
+
     private boolean isClosed = false;
 
     /**
@@ -57,6 +62,64 @@
         return true;
     }
 
+    /**
+     * @return the ignoreAtEnd
+     */
+    public int getIgnoreAtEnd() {
+        return ignoreAtEnd;
+    }
+    
+    /**
+     * @param ignoreAtEnd the ignoreAtEnd to set
+     */
+    public void setIgnoreAtEnd(int ignoreAtEnd) {
+        this.ignoreAtEnd = ignoreAtEnd;
+    }
+
+    /**
+     * decrement the ignoreAtEnd
+     * @return the ignoreAtEnd
+     */
+    public int mmIgnoreAtEnd() {
+        return --ignoreAtEnd;
+    }
+    
+    /**
+     * @return the ignoreAtStart
+     */
+    public int getIgnoreAtStart() {
+        return ignoreAtStart;
+    }
+
+    /**
+     * @param ignoreAtStart the ignoreAtStart to set
+     */
+    public void setIgnoreAtStart(int ignoreAtStart) {
+        this.ignoreAtStart = ignoreAtStart;
+    }
+
+    /**
+     * increment the ignoreAtStart
+     * @return the ignoreAtStart
+     */
+    public int ppIgnoreAtStart() {
+        return ++ignoreAtStart;
+    }
+
+    /**
+     * @return the isClosed
+     */
+    public boolean isClosed() {
+        return isClosed;
+    }
+
+    /**
+     * @param isClosed the isClosed to set
+     */
+    public void setClosed(boolean isClosed) {
+        this.isClosed = isClosed;
+    }
+
     /* (non-Javadoc)
      * {@inheritDoc}
      */
@@ -99,8 +162,24 @@
         if (!isClosed) {
             add(new KnuthPenalty(0, -KnuthElement.INFINITE, false, null, false));
             isClosed = true;
+            ++ignoreAtEnd;
         }
         return this;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.fop.layoutmgr.KnuthSequence#addKnuthElementForBorderPaddingStart(org.apache.fop.layoutmgr.KnuthElement)
+     */
+    public void addKnuthElementForBorderPaddingStart(KnuthBox bap) {
+        add(0, bap);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.fop.layoutmgr.KnuthSequence#addKnuthElementForBorderPaddingEnd(org.apache.fop.layoutmgr.KnuthElement)
+     */
+
+    public void addKnuthElementForBorderPaddingEnd(KnuthBox bap) {
+        this.add(this.size() - ignoreAtEnd, bap);
     }
 
     public void addALetterSpace() {

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/KnuthSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/KnuthSequence.java?rev=619819&r1=619818&r2=619819&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/KnuthSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/KnuthSequence.java Fri Feb  8 02:06:06 2008
@@ -168,6 +168,20 @@
     }
 
     /**
+     * Insert element elt at the start of the sequence, even if the sequence is closed.
+     * This is used to add border and padding elements.
+     * @param bap The element to be added
+     */
+    public abstract void addKnuthElementForBorderPaddingStart(KnuthBox bap);
+
+    /**
+     * Insert element elt at the end of the sequence, even if the sequence is closed.
+     * This is used to add border and padding elements.
+     * @param bap The element to be added
+     */
+    public abstract void addKnuthElementForBorderPaddingEnd(KnuthBox bap);
+
+    /**
      * Is this an inline or a block sequence?
      * @return true if this is an inline sequence
      */

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java?rev=619819&r1=619818&r2=619819&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java Fri Feb  8 02:06:06 2008
@@ -553,7 +553,14 @@
             int ipStart = borderAndPadding.getBorderStartWidth(false)
                          + borderAndPadding.getPaddingStart(false, this);
             if (ipStart > 0) {
-                returnList.add(0,new KnuthBox(ipStart, getAuxiliaryPosition(), true));
+                KnuthBox bap = new KnuthBox(ipStart, getAuxiliaryPosition(), true);
+                if (returnList instanceof KnuthSequence) {
+                // if (false) {
+                    KnuthSequence seq = (KnuthSequence) returnList;
+                    seq.addKnuthElementForBorderPaddingStart(bap);
+                } else {
+                    returnList.add(0, bap);
+                }
             }
         }
     }
@@ -569,7 +576,14 @@
             int ipEnd = borderAndPadding.getBorderEndWidth(false)
                         + borderAndPadding.getPaddingEnd(false, this);
             if (ipEnd > 0) {
-                returnList.add(new KnuthBox(ipEnd, getAuxiliaryPosition(), true));
+                KnuthBox bap = new KnuthBox(ipEnd, getAuxiliaryPosition(), true);
+                if (returnList instanceof KnuthSequence) {
+                // if (false) {
+                    KnuthSequence seq = (KnuthSequence) returnList;
+                    seq.addKnuthElementForBorderPaddingEnd(bap);
+                } else {
+                    returnList.add(bap);
+                }
             }
         }
     }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java?rev=619819&r1=619818&r2=619819&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java Fri Feb  8 02:06:06 2008
@@ -337,29 +337,29 @@
             }
 
             if (currLM != prevLM || !oldListIterator.hasNext()) {
-                if (prevLM == this || currLM == this) {
-                    prevLM = currLM;
-                } else if (oldListIterator.hasNext()) {
-                    bSomethingChanged
-                        = prevLM.applyChanges(oldList.subList(fromIndex
-                                                              , oldListIterator.previousIndex()))
+                // prevLM == null occurs when all elements have currLM == null
+                // e.g. a single BorderAndPadding element
+                if (prevLM != null && prevLM != this && currLM != this) {
+                    if (oldListIterator.hasNext()) {
+                        bSomethingChanged = prevLM.applyChanges
+                        (oldList.subList(fromIndex, oldListIterator.previousIndex()))
                         || bSomethingChanged;
-                    prevLM = currLM;
-                    fromIndex = oldListIterator.previousIndex();
-                } else if (currLM == prevLM) {
-                    bSomethingChanged
-                        = prevLM.applyChanges(oldList.subList(fromIndex, oldList.size()))
-                            || bSomethingChanged;
-                } else {
-                    bSomethingChanged
-                        = prevLM.applyChanges(oldList.subList(fromIndex
-                                                              , oldListIterator.previousIndex()))
-                            || bSomethingChanged;
-                    if (currLM != null) {
-                        bSomethingChanged
-                            = currLM.applyChanges(oldList.subList(oldListIterator.previousIndex()
-                                                                  , oldList.size()))
+                        prevLM = currLM;
+                        fromIndex = oldListIterator.previousIndex();
+                    } else if (currLM == prevLM) {
+                        bSomethingChanged = prevLM.applyChanges
+                        (oldList.subList(fromIndex, oldList.size()))
+                        || bSomethingChanged;
+                    } else {
+                        bSomethingChanged = prevLM.applyChanges
+                        (oldList.subList(fromIndex, oldListIterator.previousIndex()))
+                        || bSomethingChanged;
+                        if (currLM != null) {
+                            bSomethingChanged = currLM.applyChanges
+                            (oldList.subList(oldListIterator.previousIndex(),
+                                             oldList.size()))
                             || bSomethingChanged;
+                        }
                     }
                 }
             }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/KnuthParagraph.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/KnuthParagraph.java?rev=619819&r1=619818&r2=619819&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/KnuthParagraph.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/KnuthParagraph.java Fri Feb  8 02:06:06 2008
@@ -33,11 +33,6 @@
     
     private LineLayoutManager lineLM;
 
-    /** Number of elements to ignore at the beginning of the list. */ 
-    private int ignoreAtStart = 0;
-    /** Number of elements to ignore at the end of the list. */
-    private int ignoreAtEnd = 0;
-
     // space at the end of the last line (in millipoints)
     private MinOptMax lineFiller;
     public int textAlignment;
@@ -69,20 +64,6 @@
     }
     
     /**
-     * @return the ignoreAtEnd
-     */
-    public int getIgnoreAtEnd() {
-        return ignoreAtEnd;
-    }
-    
-    /**
-     * @return the ignoreAtStart
-     */
-    public int getIgnoreAtStart() {
-        return ignoreAtStart;
-    }
-    
-    /**
      * @return the lineLM
      */
     public LineLayoutManager getLineLayoutManager() {
@@ -125,26 +106,43 @@
         if (textAlignment == Constants.EN_CENTER && textAlignmentLast != Constants.EN_JUSTIFY) {
             this.add(new KnuthGlue(0, 3 * LineLayoutManager.DEFAULT_SPACE_WIDTH, 0,
                                    null, false));
-            ignoreAtStart++;
+            ppIgnoreAtStart();
         }
 
         // add the element representing text indentation
         // at the beginning of the first paragraph
         if (textIndent != 0) {
             this.add(new KnuthInlineBox(textIndent, null, null, false));
-            ignoreAtStart++;
+            ppIgnoreAtStart();
+        }
+    }
+
+    public void addSequence(InlineKnuthSequence seq) {
+        addAll(seq);
+        if (seq.isClosed()) {
+            // a penalty item whose value is -inf
+            // represents a preserved linefeed,
+            // which forces a line break
+            removeLast();
+            mmIgnoreAtEnd();
+            if (!containsBox()) {
+                //only a forced linefeed on this line 
+                //-> compensate with an auxiliary glue
+                add(new KnuthGlue(lineWidth, 0, lineWidth, null, true));
+            }
+            endSequence();
         }
     }
 
     public KnuthSequence endSequence() {
-        if (this.size() > ignoreAtStart) {
+        if (this.size() > getIgnoreAtStart()) {
             if (textAlignment == Constants.EN_CENTER
                 && textAlignmentLast != Constants.EN_JUSTIFY) {
                 this.add(new KnuthGlue(0, 3 * LineLayoutManager.DEFAULT_SPACE_WIDTH, 0,
                                        null, false));
                 this.add(new KnuthPenalty(lineFiller.opt, -KnuthElement.INFINITE,
                                           false, null, false));
-                ignoreAtEnd = 2;
+                setIgnoreAtEnd(2);
             } else if (textAlignmentLast != Constants.EN_JUSTIFY) {
                 // add the elements representing the space
                 // at the end of the last line
@@ -156,13 +154,14 @@
                         lineFiller.opt - lineFiller.min, null, false));
                 this.add(new KnuthPenalty(lineFiller.opt, -KnuthElement.INFINITE,
                                           false, null, false));
-                ignoreAtEnd = 3;
+                setIgnoreAtEnd(3);
             } else {
                 // add only the element representing the forced break
                 this.add(new KnuthPenalty(lineFiller.opt, -KnuthElement.INFINITE,
                                           false, null, false));
-                ignoreAtEnd = 1;
+                setIgnoreAtEnd(1);
             }
+            setClosed(true);
             return this;
         } else {
             this.clear();

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=619819&r1=619818&r2=619819&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Fri Feb  8 02:06:06 2008
@@ -42,6 +42,7 @@
 import org.apache.fop.layoutmgr.BlockLevelLayoutManager;
 import org.apache.fop.layoutmgr.BreakElement;
 import org.apache.fop.layoutmgr.ElementListObserver;
+import org.apache.fop.layoutmgr.InlineKnuthSequence;
 import org.apache.fop.layoutmgr.KnuthBlockBox;
 import org.apache.fop.layoutmgr.KnuthBox;
 import org.apache.fop.layoutmgr.KnuthElement;
@@ -480,27 +481,13 @@
                             trace.append(" +");
                         }
                     }
-                    lastPar.addAll(sequence);
+                    lastPar.addSequence((InlineKnuthSequence) sequence);
                     if (log.isTraceEnabled()) {
                         trace.append(" I");
                     }
                     
-                    // finish last paragraph if it was closed with a linefeed
-                    if (lastElement.isPenalty()
-                            && ((KnuthPenalty) lastElement).getP()
-                            == -KnuthPenalty.INFINITE) {
-                        // a penalty item whose value is -inf
-                        // represents a preserved linefeed,
-                        // which forces a line break
-                        lastPar.removeLast();
-                        if (!lastPar.containsBox()) {
-                            //only a forced linefeed on this line 
-                            //-> compensate with an auxiliary glue
-                            lastPar.add(new KnuthGlue(iLineWidth, 0, iLineWidth, null, true));
-                        }
-                        if (lastPar.endSequence() != null) {
-                            knuthParagraphs.add(lastPar);
-                        }
+                    if (lastPar.isClosed()) {
+                        knuthParagraphs.add(lastPar);
                         ElementListObserver.observe(lastPar, "line", null);
                         lastPar = null;
                         if (log.isTraceEnabled()) {
@@ -951,7 +938,7 @@
 
             // applyChanges() returns true if the LM modifies its data,
             // so it must return new KnuthElements to replace the old ones
-            if (((InlineLevelLayoutManager) currUpdate.inlineLM)
+            if ((currUpdate.inlineLM)
                 .applyChanges(currPar.subList(fromIndex + iAddedElements,
                                               toIndex + iAddedElements))) {
                 // insert the new KnuthElements

Added: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/inline_border_padding_block_nested_3.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/inline_border_padding_block_nested_3.xml?rev=619819&view=auto
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/inline_border_padding_block_nested_3.xml (added)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/inline_border_padding_block_nested_3.xml Fri Feb  8 02:06:06 2008
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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 fo:inlines with border and padding properties and nested inner blocks. Specifically, it tests whether the border and padding of the inline FO is properly added to the paragraph inside the inner 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" margin="5pt">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true" language="en">
+        <fo:flow flow-name="xsl-region-body" font-size="10pt" language="en" country="US" hyphenate="true">
+          <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt">
+            Before inline
+            <fo:inline border="solid 1pt red" padding="2pt" background-color="yellow"><fo:block>start</fo:block>
+              between blocks
+              <fo:block>end</fo:block></fo:inline>
+            After inline
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <element-list category="line" id="added-bap-start">
+      <box w="3000"/><!-- border and padding of inline -->
+      <box/>
+      <penalty/>
+      <glue/>
+      <penalty/>
+    </element-list>
+
+    <element-list category="line" id="added-bap-end">
+      <box/>
+      <box w="3000"/><!-- border and padding of inline -->
+      <penalty/>
+      <glue/>
+      <penalty/>
+    </element-list>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/inline_border_padding_block_nested_3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/inline_border_padding_block_nested_3.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