Fop
  1. Fop
  2. FOP-1377

fo:retrieve-marker misses fo:inline space character on first retrieve in page.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 0.93
    • Fix Version/s: None
    • Component/s: layout/unqualified
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC
    • External issue ID:
      42703

      Description

      If an fo:marker contains an fo:block with a nested fo:inline. If the first
      character of the fo:inline is a space, It will no be displayed the first time
      this marker is retrieved on a page.

      1. FOP_BUG_42703.fo
        3 kB
        Guillaume Levrero
      2. instl.svg
        1 kB
        Guillaume Levrero
      3. BUG-graphic-missing-white-space.fo
        2 kB
        Guillaume Levrero
      4. BUG-retrieve-marker.pdf
        5 kB
        Guillaume Levrero
      5. BUG-retrieve-marker.fo
        1 kB
        Guillaume Levrero

        Activity

        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed
        Hide
        Andreas L. Delmelle added a comment -
        Show
        Andreas L. Delmelle added a comment - Fixed in FOP Trunk. see: http://svn.apache.org/viewvc?rev=652835&view=rev
        Hide
        Andreas L. Delmelle added a comment -

        FWIW: I have this fixed again, locally. SVN commit is disabled, but as soon as it is enabled again, I'll commit the fix.

        For documentation purposes: the cause of this regression was the patch for Bugzilla 44286. The 'currentBlock' variable was no longer persistent across calls to XMLWhiteSpaceHandler.handleWhiteSpace(). Fixed by pushing the ancestor block for the retrieve-marker onto the stack of nested blocks.

        Show
        Andreas L. Delmelle added a comment - FWIW: I have this fixed again, locally. SVN commit is disabled, but as soon as it is enabled again, I'll commit the fix. For documentation purposes: the cause of this regression was the patch for Bugzilla 44286. The 'currentBlock' variable was no longer persistent across calls to XMLWhiteSpaceHandler.handleWhiteSpace(). Fixed by pushing the ancestor block for the retrieve-marker onto the stack of nested blocks.
        Hide
        Andreas L. Delmelle added a comment -

        (In reply to comment #8)
        > Problem still seem to occur on last foptrunk 646383.

        Confirmed. Thanks for supplying this kind of cases.

        I'll look into fixing this. If it's a showstopper, then luckily there is a very easy workaround: move the first space character out of the inline, so make it

        <fo:marker> Block <fo:inline>with inline content</fo:inline>

        Show
        Andreas L. Delmelle added a comment - (In reply to comment #8) > Problem still seem to occur on last foptrunk 646383. Confirmed. Thanks for supplying this kind of cases. I'll look into fixing this. If it's a showstopper, then luckily there is a very easy workaround: move the first space character out of the inline, so make it <fo:marker> Block <fo:inline>with inline content</fo:inline>
        Hide
        Guillaume Levrero added a comment -

        Attachment FOP_BUG_42703.fo has been added with description: FO case to show that needs to be REOPEN

        Show
        Guillaume Levrero added a comment - Attachment FOP_BUG_42703.fo has been added with description: FO case to show that needs to be REOPEN
        Hide
        Guillaume Levrero added a comment -

        Problem still seem to occur on last foptrunk 646383.

        Show
        Guillaume Levrero added a comment - Problem still seem to occur on last foptrunk 646383.
        Hide
        Andreas L. Delmelle added a comment -

        Apologies for the delay.

        Fixed in FOP trunk. see: http://svn.apache.org/viewvc?rev=576072&view=rev

        Thanks for reporting the issue.

        For documentation purposes:
        The problem was that for regular (non-marker) FO nodes, addChildNode() is called BEFORE the node's
        children are processed and added, and this was not yet the case while cloning the marker. This led to
        the XMLWhiteSpaceHandler being incorrectly initialized, which caused the erroneous white-space
        removal.

        This has now been corrected: when cloning the marker-descendants, addChildNode() is now also called
        before cloning the rest of the subtree.

        Show
        Andreas L. Delmelle added a comment - Apologies for the delay. Fixed in FOP trunk. see: http://svn.apache.org/viewvc?rev=576072&view=rev Thanks for reporting the issue. For documentation purposes: The problem was that for regular (non-marker) FO nodes, addChildNode() is called BEFORE the node's children are processed and added, and this was not yet the case while cloning the marker. This led to the XMLWhiteSpaceHandler being incorrectly initialized, which caused the erroneous white-space removal. This has now been corrected: when cloning the marker-descendants, addChildNode() is now also called before cloning the rest of the subtree.
        Hide
        Guillaume Levrero added a comment -

        Attachment instl.svg has been added with description: Graphic to be used with FO

        Show
        Guillaume Levrero added a comment - Attachment instl.svg has been added with description: Graphic to be used with FO
        Hide
        Guillaume Levrero added a comment -

        Attachment BUG-graphic-missing-white-space.fo has been added with description: FO with graphic element

        Show
        Guillaume Levrero added a comment - Attachment BUG-graphic-missing-white-space.fo has been added with description: FO with graphic element
        Hide
        Guillaume Levrero added a comment -

        Bug is not fully resolved. If an external-graphic element is inserted in the
        fo:inline the white space is missing again.

        Show
        Guillaume Levrero added a comment - Bug is not fully resolved. If an external-graphic element is inserted in the fo:inline the white space is missing again.
        Hide
        Andreas L. Delmelle added a comment -

        Fixed in FOP Trunk.
        see: http://svn.apache.org/viewvc?view=rev&rev=550098

        Thanks for reporting!

        Show
        Andreas L. Delmelle added a comment - Fixed in FOP Trunk. see: http://svn.apache.org/viewvc?view=rev&rev=550098 Thanks for reporting!
        Hide
        Guillaume Levrero added a comment -

        Attachment BUG-retrieve-marker.pdf has been added with description: PDF output

        Show
        Guillaume Levrero added a comment - Attachment BUG-retrieve-marker.pdf has been added with description: PDF output
        Hide
        Guillaume Levrero added a comment -

        Attachment BUG-retrieve-marker.fo has been added with description: FO to reproduce the problem

        Show
        Guillaume Levrero added a comment - Attachment BUG-retrieve-marker.fo has been added with description: FO to reproduce the problem

          People

          • Assignee:
            fop-dev
            Reporter:
            Guillaume Levrero
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development