You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Andreas L. Delmelle (JIRA)" <ji...@apache.org> on 2015/05/25 23:24:17 UTC

[jira] [Commented] (FOP-2268) Empty wrapper in otherwise empty block results in an extra inline area

    [ https://issues.apache.org/jira/browse/FOP-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14558534#comment-14558534 ] 

Andreas L. Delmelle commented on FOP-2268:
------------------------------------------

Confirmed, this is definitely a bug, and one that has been with us for quite a while, apparently... I tried a few older FOP versions, and they showed a similar result.

It seems to be an unintended side effect of the way wrappers are processed in the layout engine. When the element list is collected by the parent block's LineLayoutManager, a dummy area is generated to make sure that the wrapper is not lost, in case it has an id.
This seems to 'confuse' the LineLayoutManager so that it returns one line-box, which results in the empty lineArea that can be seen in the area tree XML. 
If the wrapper does have an id, the lineArea gets one child area to hold the "prod-id", so that it can be referenced via page-number-citations, basic-links or bookmarks.
If it does not, the lineArea should actually be thrown away, but currently, it still gets added to the area tree.
Even if the empty wrapper did have an id, I still think the more correct result would be a zero-height lineArea, so that input like

{code:xml}
<block>AAA</block>
<block><wrapper id="empty-wrapper"/></block>
<block>AAA</block>
{code}

would lead to only 2 visible lines in the output, like so:

AAA
AAA

> Empty wrapper in otherwise empty block results in an extra inline area
> ----------------------------------------------------------------------
>
>                 Key: FOP-2268
>                 URL: https://issues.apache.org/jira/browse/FOP-2268
>             Project: FOP
>          Issue Type: Bug
>          Components: renderer/pdf
>    Affects Versions: 1.1
>         Environment: Windows (probably occurs regardless of the OS)
>            Reporter: Nick Heyworth
>            Priority: Minor
>         Attachments: test.fo
>
>
> The attached FO contains
> 1) an empty block
> 2) an empty wrapper
> 3) an empty wrapper in a block
> I was expecting none of these to render an area, but 3) causes some "empty space" to be rendered. Am I expecting the wrong thing, or is this a bug?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)