From c3ad778fa810332a2f24ce9328c142fb654ae8a6 Mon Sep 17 00:00:00 2001 From: Glenn Adams Date: Tue, 3 Apr 2012 16:33:30 +0000 Subject: [PATCH] Bugzilla #53005: Fix incorrect treatment of fo:wrapper as %block in fo:footnote git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1309024 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/FObj.java | 2 +- src/java/org/apache/fop/fo/flow/Inline.java | 3 +- status.xml | 5 +- .../standard-testcases/footnote_bug53005.xml | 55 +++++++++++++++++++ 4 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 test/layoutengine/standard-testcases/footnote_bug53005.xml diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java index f1d78acf1..241a442ab 100644 --- a/src/java/org/apache/fop/fo/FObj.java +++ b/src/java/org/apache/fop/fo/FObj.java @@ -501,7 +501,7 @@ public abstract class FObj extends FONode implements Constants { * @param lName local name (i.e., no prefix) of incoming node * @return true if a member, false if not */ - boolean isNeutralItem(String nsURI, String lName) { + protected boolean isNeutralItem(String nsURI, String lName) { return (FO_URI.equals(nsURI) && ("multi-switch".equals(lName) || "multi-properties".equals(lName) diff --git a/src/java/org/apache/fop/fo/flow/Inline.java b/src/java/org/apache/fop/fo/flow/Inline.java index debf6bbf6..3a9583580 100644 --- a/src/java/org/apache/fop/fo/flow/Inline.java +++ b/src/java/org/apache/fop/fo/flow/Inline.java @@ -116,7 +116,8 @@ public class Inline extends InlineLevel { } } else if (!isBlockOrInlineItem(nsURI, localName)) { invalidChildError(loc, nsURI, localName); - } else if (!canHaveBlockLevelChildren && isBlockItem(nsURI, localName)) { + } else if (!canHaveBlockLevelChildren && isBlockItem(nsURI, localName) + && !isNeutralItem(nsURI, localName)) { invalidChildError(loc, getParent().getName(), nsURI, getName(), "rule.inlineContent"); } else { diff --git a/status.xml b/status.xml index b36097928..b0ffd0180 100644 --- a/status.xml +++ b/status.xml @@ -62,12 +62,15 @@ documents. Example: the fix of marks layering will be such a case when it's done. --> + + Fixed incorrect rejection of fo:wrapper inside fo:inline inside fo:footnote-body. + Added support for PDF Object Streams. When accessibility is enabled and PDF version 1.5 selected, the structure tree will be stored in object streams in order to reduce the size of the final PDF. - + Fixed deadlock in PropertyCache. diff --git a/test/layoutengine/standard-testcases/footnote_bug53005.xml b/test/layoutengine/standard-testcases/footnote_bug53005.xml new file mode 100644 index 000000000..e8cda0631 --- /dev/null +++ b/test/layoutengine/standard-testcases/footnote_bug53005.xml @@ -0,0 +1,55 @@ + + + + + +

+ This test verifies that fo:wrapper may appear in fo:inline inside an fo:footnote, for which + bug #53005 was reported. +

+
+ + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + +
-- 2.39.5