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 2005/12/28 10:10:43 UTC

svn commit: r359451 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/layoutmgr/inline/ test/layoutengine/standard-testcases/

Author: spepping
Date: Wed Dec 28 01:10:36 2005
New Revision: 359451

URL: http://svn.apache.org/viewcvs?rev=359451&view=rev
Log:
Each block in inline content now appears in its own line area.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_block_nested_5.xml
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_border_padding_block_nested_1.xml
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_border_padding_block_nested_2.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=359451&r1=359450&r2=359451&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Wed Dec 28 01:10:36 2005
@@ -949,7 +949,9 @@
         while (paragraphsIterator.hasPrevious()) {
             KnuthSequence seq = (KnuthSequence) paragraphsIterator.previous();
             if (!seq.isInlineSequence()) {
-                llPoss = createBlockLineBreak(seq);
+                // This set of line layout possibilities does not matter;
+                // we only need an entry in lineLayoutsList.
+                llPoss = new LineLayoutPossibilities();
             } else {
                 llPoss = findOptimalBreakingPoints(alignment, (Paragraph) seq);
             }
@@ -963,39 +965,6 @@
     }
 
     /**
-     * create a single line layout possibility with a single linebreak
-     * for a block sequence
-     * @param seq the Knuth sequence for which the linebreak is created
-     * @return the line layout possibilities for the paragraph
-     */
-    private LineLayoutPossibilities createBlockLineBreak(KnuthSequence seq) {
-        //TODO Should this really create only a single LineBreakPosition???
-        //This creates an implicit keep-together on the nested block-level FOs.
-        LineLayoutPossibilities llPoss = new LineLayoutPossibilities();
-        llPoss.addPossibility(1, 0);
-        int localLineHeight = 0, lineStretch = 0, lineShrink = 0;
-        ListIterator seqIterator = seq.listIterator();
-        while (seqIterator.hasNext()) {
-            ListElement elt = (ListElement) seqIterator.next();
-            if (!(elt instanceof KnuthElement)) {
-                continue;
-            }
-            KnuthElement element = (KnuthElement) elt;
-            localLineHeight += element.getW();
-            if (element.isGlue()) {
-                lineStretch += element.getY();
-                lineShrink += element.getZ();
-            }
-        }
-        LineBreakPosition lbp = new LineBreakPosition(this,
-                knuthParagraphs.indexOf(seq), 0, seq.size() - 1,
-                lineShrink, lineStretch, 0, 0, 0, 0, localLineHeight,
-                iLineWidth, 0, 0, 0);
-        llPoss.addBreakPosition(lbp, 0);
-        return llPoss;
-    }
-
-    /**
      * Fint the optimal linebreaks for a paragraph
      * @param alignment alignment of the paragraph
      * @param currPar the Paragraph for which the linebreaks are found
@@ -1654,184 +1623,204 @@
      */
     public void addAreas(PositionIterator parentIter,
                          LayoutContext context) {
-        LayoutManager childLM;
-        LayoutContext lc = new LayoutContext(0);
-        lc.setAlignmentContext(alignmentContext);
-        int iCurrParIndex;
         while (parentIter.hasNext()) {
             Position pos = (Position) parentIter.next();
+            boolean isLastPosition = !parentIter.hasNext();
             if (pos instanceof LineBreakPosition) {
-                ListIterator seqIterator = null;
-                KnuthElement tempElement = null;
-                // the TLM which created the last KnuthElement in this line
-                LayoutManager lastLM = null;
-    
-                LineBreakPosition lbp = (LineBreakPosition) pos;
-                iCurrParIndex = lbp.iParIndex;
-                KnuthSequence seq = (KnuthSequence) knuthParagraphs.get(iCurrParIndex);
-                int iStartElement = lbp.iStartIndex;
-                int iEndElement = lbp.getLeafPos();
-    
-                LineArea lineArea
-                  = new LineArea((lbp.getLeafPos() < seq.size() - 1
-                                  ? textAlignment : textAlignmentLast),
-                                 lbp.difference, lbp.availableStretch, lbp.availableShrink);
-                lineArea.setStartIndent(lbp.startIndent);
-                lineArea.setBPD(lbp.lineHeight);
-                lineArea.setIPD(lbp.lineWidth);
-                lineArea.addTrait(Trait.SPACE_BEFORE, new Integer(lbp.spaceBefore));
-                lineArea.addTrait(Trait.SPACE_AFTER, new Integer(lbp.spaceAfter));
-                alignmentContext.resizeLine(lbp.lineHeight, lbp.baseline);
-
-                if (seq instanceof Paragraph) {
-                    Paragraph currPar = (Paragraph) seq;
-                    // ignore the first elements added by the LineLayoutManager
-                    iStartElement += (iStartElement == 0) ? currPar.ignoreAtStart : 0;
-                    
-                    // if this is the last line area that for this paragraph,
-                    // ignore the last elements added by the LineLayoutManager and
-                    // subtract the last-line-end-indent from the area ipd
-                    if (iEndElement == (currPar.size() - 1)) {
-                        iEndElement -= currPar.ignoreAtEnd;
-                        lineArea.setIPD(lineArea.getIPD() - lastLineEndIndent.getValue(this));
-                    }
-                }
+                addInlineArea(context, pos, isLastPosition);
+            } else if ((pos instanceof NonLeafPosition) && pos.generatesAreas()) {
+                addBlockArea(context, pos, isLastPosition);
+            } else {
+                /*                
+                 * pos was the Position inside a penalty item, nothing to do;
+                 * or Pos does not generate an area,
+                 * i.e. it stand for spaces, borders and padding.
+                 */            
+            }
+        }
+        setCurrentArea(null); // ?? necessary
+    }
+
+    /**
+     * Add a line with inline content
+     * @param context the context for adding areas
+     * @param pos the position for which the line is generated
+     * @param isLastPosition true if this is the last position of this LM
+     */
+    private void addInlineArea(LayoutContext context, Position pos, boolean isLastPosition) {
+            ListIterator seqIterator = null;
+            KnuthElement tempElement = null;
+            // the TLM which created the last KnuthElement in this line
+            LayoutManager lastLM = null;
+            
+            LineBreakPosition lbp = (LineBreakPosition) pos;
+            int iCurrParIndex;
+            iCurrParIndex = lbp.iParIndex;
+            KnuthSequence seq = (KnuthSequence) knuthParagraphs.get(iCurrParIndex);
+            int iStartElement = lbp.iStartIndex;
+            int iEndElement = lbp.getLeafPos();
+            
+            LineArea lineArea
+              = new LineArea((lbp.getLeafPos() < seq.size() - 1
+                              ? textAlignment : textAlignmentLast),
+                              lbp.difference, lbp.availableStretch, lbp.availableShrink);
+            lineArea.setStartIndent(lbp.startIndent);
+            lineArea.setBPD(lbp.lineHeight);
+            lineArea.setIPD(lbp.lineWidth);
+            lineArea.addTrait(Trait.SPACE_BEFORE, new Integer(lbp.spaceBefore));
+            lineArea.addTrait(Trait.SPACE_AFTER, new Integer(lbp.spaceAfter));
+            alignmentContext.resizeLine(lbp.lineHeight, lbp.baseline);
+            
+            if (seq instanceof Paragraph) {
+                Paragraph currPar = (Paragraph) seq;
+                // ignore the first elements added by the LineLayoutManager
+                iStartElement += (iStartElement == 0) ? currPar.ignoreAtStart : 0;
                 
-                // ignore the last element in the line if it is a KnuthGlue object
-                seqIterator = seq.listIterator(iEndElement);
-                tempElement = (KnuthElement) seqIterator.next();
-                if (tempElement.isGlue()) {
-                    iEndElement--;
-                    // this returns the same KnuthElement
-                    seqIterator.previous();
-                    tempElement = (KnuthElement) seqIterator.previous();
+                // if this is the last line area that for this paragraph,
+                // ignore the last elements added by the LineLayoutManager and
+                // subtract the last-line-end-indent from the area ipd
+                if (iEndElement == (currPar.size() - 1)) {
+                    iEndElement -= currPar.ignoreAtEnd;
+                    lineArea.setIPD(lineArea.getIPD() - lastLineEndIndent.getValue(this));
                 }
-                lastLM = tempElement.getLayoutManager();
-    
-                // ignore KnuthGlue and KnuthPenalty objects
-                // at the beginning of the line
-                seqIterator = seq.listIterator(iStartElement);
+            }
+            
+            // ignore the last element in the line if it is a KnuthGlue object
+            seqIterator = seq.listIterator(iEndElement);
+            tempElement = (KnuthElement) seqIterator.next();
+            if (tempElement.isGlue()) {
+                iEndElement--;
+                // this returns the same KnuthElement
+                seqIterator.previous();
+                tempElement = (KnuthElement) seqIterator.previous();
+            }
+            lastLM = tempElement.getLayoutManager();
+            
+            // ignore KnuthGlue and KnuthPenalty objects
+            // at the beginning of the line
+            seqIterator = seq.listIterator(iStartElement);
+            tempElement = (KnuthElement) seqIterator.next();
+            while (!tempElement.isBox() && seqIterator.hasNext()) {
                 tempElement = (KnuthElement) seqIterator.next();
-                while (!tempElement.isBox() && seqIterator.hasNext()) {
-                    tempElement = (KnuthElement) seqIterator.next();
-                    iStartElement++;
-                }
-    
-                // Add the inline areas to lineArea
-                PositionIterator inlinePosIter
-                    = new KnuthPossPosIter(seq, iStartElement,
-                                           iEndElement + 1);
-    
-                iStartElement = lbp.getLeafPos() + 1;
-                if (iStartElement == seq.size()) {
-                    // advance to next paragraph
-                    iStartElement = 0;
-                }
-    
-                lc.setSpaceAdjust(lbp.dAdjust);
-                lc.setIPDAdjust(lbp.ipdAdjust);
-                lc.setLeadingSpace(new SpaceSpecifier(true));
+                iStartElement++;
+            }
+            
+            // Add the inline areas to lineArea
+            PositionIterator inlinePosIter
+              = new KnuthPossPosIter(seq, iStartElement, iEndElement + 1);
+            
+            iStartElement = lbp.getLeafPos() + 1;
+            if (iStartElement == seq.size()) {
+                // advance to next paragraph
+                iStartElement = 0;
+            }
+            
+            LayoutContext lc = new LayoutContext(0);
+            lc.setAlignmentContext(alignmentContext);
+            lc.setSpaceAdjust(lbp.dAdjust);
+            lc.setIPDAdjust(lbp.ipdAdjust);
+            lc.setLeadingSpace(new SpaceSpecifier(true));
+            lc.setTrailingSpace(new SpaceSpecifier(false));
+            lc.setFlags(LayoutContext.RESOLVE_LEADING_SPACE, true);
+            
+            /*
+             * extension (not in the XSL FO recommendation): if the left and right margins
+             * have been optimized, recompute indents and / or adjust ratio, according
+             * to the paragraph horizontal alignment
+             */
+            if (false && textAlignment == EN_JUSTIFY) {
+                // re-compute space adjust ratio
+                int updatedDifference = context.getStackLimit().opt
+                                        - lbp.lineWidth + lbp.difference;
+                double updatedRatio = 0.0;
+                if (updatedDifference > 0) {
+                    updatedRatio = (float) updatedDifference / lbp.availableStretch;
+                } else if (updatedDifference < 0) {
+                    updatedRatio = (float) updatedDifference / lbp.availableShrink;
+                }
+                lc.setIPDAdjust(updatedRatio);
+                //log.debug("LLM.addAreas> old difference = " + lbp.difference + " new difference = " + updatedDifference);
+                //log.debug("              old ratio = " + lbp.ipdAdjust + " new ratio = " + updatedRatio);
+            } else if (false && textAlignment == EN_CENTER) {
+                // re-compute indent
+                int updatedIndent = lbp.startIndent
+                                    + (context.getStackLimit().opt - lbp.lineWidth) / 2;
+                lineArea.setStartIndent(updatedIndent);
+            } else if (false && textAlignment == EN_END) {
+                // re-compute indent
+                int updatedIndent = lbp.startIndent 
+                                    + (context.getStackLimit().opt - lbp.lineWidth);
+                lineArea.setStartIndent(updatedIndent);
+            }
+            
+            setCurrentArea(lineArea);
+            setChildContext(lc);
+            LayoutManager childLM;
+            while ((childLM = inlinePosIter.getNextChildLM()) != null) {
+                lc.setFlags(LayoutContext.LAST_AREA, (childLM == lastLM));
+                childLM.addAreas(inlinePosIter, lc);
+                lc.setLeadingSpace(lc.getTrailingSpace());
                 lc.setTrailingSpace(new SpaceSpecifier(false));
-                lc.setFlags(LayoutContext.RESOLVE_LEADING_SPACE, true);
-
-                /* extension (not in the XSL FO recommendation): if the left and right margins
-                   have been optimized, recompute indents and / or adjust ratio, according
-                   to the paragraph horizontal alignment */
-                if (false && textAlignment == EN_JUSTIFY) {
-                    // re-compute space adjust ratio
-                    int updatedDifference = context.getStackLimit().opt
-                                            - lbp.lineWidth + lbp.difference;
-                    double updatedRatio = 0.0;
-                    if (updatedDifference > 0) {
-                        updatedRatio = (float) updatedDifference / lbp.availableStretch;
-                    } else if (updatedDifference < 0) {
-                        updatedRatio = (float) updatedDifference / lbp.availableShrink;
-                    }
-                    lc.setIPDAdjust(updatedRatio);
-                    //log.debug("LLM.addAreas> old difference = " + lbp.difference + " new difference = " + updatedDifference);
-                    //log.debug("              old ratio = " + lbp.ipdAdjust + " new ratio = " + updatedRatio);
-                } else if (false && textAlignment == EN_CENTER) {
-                    // re-compute indent
-                    int updatedIndent = lbp.startIndent
-                                            + (context.getStackLimit().opt - lbp.lineWidth) / 2;
-                    lineArea.setStartIndent(updatedIndent);
-                } else if (false && textAlignment == EN_END) {
-                    // re-compute indent
-                    int updatedIndent = lbp.startIndent 
-                                            + (context.getStackLimit().opt - lbp.lineWidth);
-                    lineArea.setStartIndent(updatedIndent);
-                }
-
-                setCurrentArea(lineArea);
-                setChildContext(lc);
-                while ((childLM = inlinePosIter.getNextChildLM()) != null) {
-                    lc.setFlags(LayoutContext.LAST_AREA, (childLM == lastLM));
-                    childLM.addAreas(inlinePosIter, lc);
-                    lc.setLeadingSpace(lc.getTrailingSpace());
-                    lc.setTrailingSpace(new SpaceSpecifier(false));
-                }
-                
-                // when can this be null?
-                // if display-align is distribute, add space after 
-                if (context.getSpaceAfter() > 0
-                    && (!context.isLastArea() || parentIter.hasNext())) {
-                    lineArea.setBPD(lineArea.getBPD() + context.getSpaceAfter());
-                }
-                lineArea.finalise();
-                parentLM.addChildArea(lineArea);
-            } else if (pos instanceof NonLeafPosition) {
-                // Nested block-level content;
-                // go down the LM stack again;
-                // collect all consecutive NonLeafPosition objects,
-                // "unwrap" them and put the child positions in a new list.
-                LinkedList positionList = new LinkedList();
-                Position innerPosition;
-                innerPosition = ((NonLeafPosition) pos).getPosition();
-                positionList.add(innerPosition);
-                while (parentIter.hasNext()) {
-                    pos = (Position)parentIter.peekNext();
-                    if (!(pos instanceof NonLeafPosition)) {
-                        break;
-                    }
-                    pos = (Position) parentIter.next();
-                    innerPosition = ((NonLeafPosition) pos).getPosition();
-                    positionList.add(innerPosition);
-                }
-                
-                // do we have the last LM?
-                LayoutManager lastLM = null;
-                if (!parentIter.hasNext()) {
-                    lastLM = innerPosition.getLM();
-                }
-
-                // this may be wrong; not all areas belong inside a single line area
-                // see InlineStackingLM.addChildArea
-                LineArea lineArea = new LineArea();
-                setCurrentArea(lineArea);
-                setChildContext(lc);
-
-                PositionIterator childPosIter = new StackingIter(positionList.listIterator());
-                LayoutContext blocklc = new LayoutContext(0);
-                blocklc.setLeadingSpace(new SpaceSpecifier(true));
-                blocklc.setTrailingSpace(new SpaceSpecifier(false));
-                blocklc.setFlags(LayoutContext.RESOLVE_LEADING_SPACE, true);
-                while ((childLM = childPosIter.getNextChildLM()) != null) {
-                    // set last area flag
-                    blocklc.setFlags(LayoutContext.LAST_AREA,
-                            (context.isLastArea() && childLM == lastLM));
-                    blocklc.setStackLimit(context.getStackLimit());
-                    // Add the line areas to Area
-                    childLM.addAreas(childPosIter, blocklc);
-                    blocklc.setLeadingSpace(blocklc.getTrailingSpace());
-                    blocklc.setTrailingSpace(new SpaceSpecifier(false));
-                }
-                lineArea.updateExtentsFromChildren();
-                parentLM.addChildArea(lineArea);
-            } else {
-                // pos was the Position inside a penalty item, nothing to do
             }
+            
+            // when can this be null?
+            // if display-align is distribute, add space after 
+            if (context.getSpaceAfter() > 0
+                    && (!context.isLastArea() || !isLastPosition)) {
+                lineArea.setBPD(lineArea.getBPD() + context.getSpaceAfter());
+            }
+            lineArea.finalise();
+            parentLM.addChildArea(lineArea);
+    }
+    
+    /**
+     * Add a line with block content
+     * @param context the context for adding areas
+     * @param pos the position for which the line is generated
+     * @param isLastPosition true if this is the last position of this LM
+     */
+    private void addBlockArea(LayoutContext context, Position pos, boolean isLastPosition) {
+        /* Nested block-level content;
+         * go down the LM stack again;
+         * "unwrap" the positions and put the child positions in a new list.
+         * The positionList must contain one area-generating position,
+         * which creates one line area.
+         */
+        List positionList = new ArrayList(1);
+        Position innerPosition;
+        innerPosition = ((NonLeafPosition) pos).getPosition();
+        positionList.add(innerPosition);
+
+        // do we have the last LM?
+        LayoutManager lastLM = null;
+        if (isLastPosition) {
+            lastLM = innerPosition.getLM();
         }
-        setCurrentArea(null); // ?? necessary
+        
+        LineArea lineArea = new LineArea();
+        setCurrentArea(lineArea);
+        LayoutContext lc = new LayoutContext(0);
+        lc.setAlignmentContext(alignmentContext);
+        setChildContext(lc);
+        
+        PositionIterator childPosIter = new StackingIter(positionList.listIterator());
+        LayoutContext blocklc = new LayoutContext(0);
+        blocklc.setLeadingSpace(new SpaceSpecifier(true));
+        blocklc.setTrailingSpace(new SpaceSpecifier(false));
+        blocklc.setFlags(LayoutContext.RESOLVE_LEADING_SPACE, true);
+        LayoutManager childLM;
+        while ((childLM = childPosIter.getNextChildLM()) != null) {
+            // set last area flag
+            blocklc.setFlags(LayoutContext.LAST_AREA,
+                             (context.isLastArea() && childLM == lastLM));
+            blocklc.setStackLimit(context.getStackLimit());
+            // Add the line areas to Area
+            childLM.addAreas(childPosIter, blocklc);
+            blocklc.setLeadingSpace(blocklc.getTrailingSpace());
+            blocklc.setTrailingSpace(new SpaceSpecifier(false));
+        }
+        lineArea.updateExtentsFromChildren();
+        parentLM.addChildArea(lineArea);
     }
 
     /**

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_block_nested_5.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_block_nested_5.xml?rev=359451&r1=359450&r2=359451&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_block_nested_5.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_block_nested_5.xml Wed Dec 28 01:10:36 2005
@@ -18,37 +18,63 @@
 <testcase>
   <info>
     <p>
-      This test checks whether inline block content does not generate
-ClassCastExceptions. The exceptions would occur because an
-UnresolvedElement in a list of ListElements is cast to a KnuthElement.
+      This test checks fo:inlines which generate multiple consecutive
+inlineblockparent areas. Each inlineblockparent area should appear in
+its own line area. Two cases: 1. A block containing multiple
+lines. 2. A block containing multiple child blocks which must be kept
+together (so that there are not break positions between the positions
+for the blocks).
+    <p>
+      Implicitly this test checks whether inline block content does
+not generate ClassCastExceptions. The exceptions would occur because
+an UnresolvedElement in a list of ListElements would be cast to a
+KnuthElement.
+    </p>
     </p>
   </info>
   <fo>
-    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <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: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">
-        <fo:flow flow-name="xsl-region-body">
-          <fo:block id="svg"><fo:inline>This book is designed to be the clear, concise, normative reference to the DocBook DTD. This book is the official documentation for the DocBook DTD:<fo:block>A=B</fo:block><fo:block><fo:block>A1=B1,</fo:block><fo:block>A2=B2.</fo:block></fo:block>We hope to answer, definitively, all the questions you might have about all the elements and entities in DocBook. In particular, we cover the following subjects.</fo:inline>End of the DocBook blurb.</fo:block>
+      <fo:page-sequence master-reference="normal"
+       white-space-collapse="true" language="en">
+        <fo:flow flow-name="xsl-region-body" font-size="10pt">
+          <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt">
+            <fo:inline>before block
+              <fo:block background-color="yellow"
+                        border="solid 1pt red">
+As far as the laws of mathematics refer to reality, they are not
+certain, and as far as they are certain, they do not refer to reality
+- Albert Einstein
+              </fo:block>
+after block</fo:inline>
+           </fo:block>
+          <fo:block background-color="silver" margin="3pt 0pt 3pt 0pt">
+            <fo:inline>before block
+              <fo:block keep-together.within-page="always"
+               background-color="yellow" border="solid 1pt red">
+                <fo:block>A1=B1,</fo:block>
+                <fo:block>A2=B2.</fo:block>
+              </fo:block>
+after block</fo:inline>
+          </fo:block>
         </fo:flow>
       </fo:page-sequence>
-
     </fo:root>
   </fo>
   <checks>
     <true xpath="boolean(//flow/block[1]/lineArea[1]/inlineparent[1])"/>
-    <true xpath="boolean(//flow/block[1]/lineArea[2]/inlineparent[1])"/>
-    <true xpath="boolean(//flow/block[1]/lineArea[3]/inlineparent[1])"/>
-    <true xpath="boolean(//flow/block[1]/lineArea[4]/inlineblockparent[1])"/>
-    <true xpath="boolean(//flow/block[1]/lineArea[5]/inlineblockparent[1])"/>
-    <true xpath="boolean(//flow/block[1]/lineArea[6]/inlineblockparent[1])"/>
-    <true xpath="boolean(//flow/block[1]/lineArea[7]/inlineparent[1])"/>
-    <true xpath="boolean(//flow/block[1]/lineArea[8]/inlineparent[1])"/>
-    <true xpath="boolean(//flow/block[1]/lineArea[9]/inlineparent[1])"/>
+    <true xpath="boolean(//flow/block[1]/lineArea[2]/inlineblockparent[1])"/>
+    <true xpath="boolean(//flow/block[1]/lineArea[3]/inlineblockparent[1])"/>
+    <true xpath="boolean(//flow/block[1]/lineArea[4]/inlineparent[1])"/>
+    <true xpath="boolean(//flow/block[2]/lineArea[1]/inlineparent[1])"/>
+    <true xpath="boolean(//flow/block[2]/lineArea[2]/inlineblockparent[1])"/>
+    <true xpath="boolean(//flow/block[2]/lineArea[3]/inlineblockparent[1])"/>
+    <true xpath="boolean(//flow/block[2]/lineArea[4]/inlineparent[1])"/>
   </checks>
 </testcase>
-				          

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_border_padding_block_nested_1.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_border_padding_block_nested_1.xml?rev=359451&r1=359450&r2=359451&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_border_padding_block_nested_1.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_border_padding_block_nested_1.xml Wed Dec 28 01:10:36 2005
@@ -100,7 +100,6 @@
     
     <eval expected="54470" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipd"/>
     <eval expected="57470" xpath="//flow/block[3]/lineArea[1]/inlineparent/@ipda"/>
-    <eval expected="2000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[1]/inlineparent/@border-start"/>
@@ -111,16 +110,24 @@
     <eval expected="350000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@ipda"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@border-before"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@offset"/>
     <eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@padding-after"/>
     <eval expected="1000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@padding-before"/>
-    <eval expected="46130" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="49130" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="350000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@ipd"/>
+    <eval expected="350000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@ipda"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-before"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@offset"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-before"/>
+    <eval expected="46130" xpath="//flow/block[3]/lineArea[4]/inlineparent/@ipd"/>
+    <eval expected="49130" xpath="//flow/block[3]/lineArea[4]/inlineparent/@ipda"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-end"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-end"/>
     
   </checks>
 </testcase>

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_border_padding_block_nested_2.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_border_padding_block_nested_2.xml?rev=359451&r1=359450&r2=359451&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_border_padding_block_nested_2.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_border_padding_block_nested_2.xml Wed Dec 28 01:10:36 2005
@@ -153,16 +153,27 @@
     <eval expected="2000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@padding-before"/>
     <eval expected="2000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@padding-start"/>
     <eval expected="2000" xpath="//flow/block[3]/lineArea[2]/inlineblockparent/@padding-end"/>
-    <eval expected="46130" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipd"/>
-    <eval expected="52130" xpath="//flow/block[3]/lineArea[3]/inlineparent/@ipda"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-start"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineparent/@border-end"/>
-    <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-after"/>
-    <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-start"/>
-    <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineparent/@padding-end"/>
+    <eval expected="344000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@ipd"/>
+    <eval expected="350000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@ipda"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@offset"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-start"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@border-end"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-after"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-start"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[3]/inlineblockparent/@padding-end"/>
+    <eval expected="46130" xpath="//flow/block[3]/lineArea[4]/inlineparent/@ipd"/>
+    <eval expected="52130" xpath="//flow/block[3]/lineArea[4]/inlineparent/@ipda"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-start"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea[4]/inlineparent/@border-end"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-after"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-start"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea[4]/inlineparent/@padding-end"/>
     
   </checks>
 </testcase>



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