Bug 45715 - [PATCH] break-before not respected on blocks nested in inlines
Summary: [PATCH] break-before not respected on blocks nested in inlines
Status: RESOLVED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: page-master/layout (show other bugs)
Version: trunk
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-30 06:43 UTC by Andreas L. Delmelle
Modified: 2012-09-04 16:14 UTC (History)
0 users



Attachments
testcase demonstrating the issue (1.05 KB, text/plain)
2008-08-30 06:43 UTC, Andreas L. Delmelle
Details
related issue if inline replaced by block (1.04 KB, application/octet-stream)
2012-04-28 22:24 UTC, Luis Bernardo
Details
output of original testcase.fo (6.04 KB, application/pdf)
2012-04-28 22:25 UTC, Luis Bernardo
Details
output of newtestcase.fo (7.32 KB, application/pdf)
2012-04-28 22:26 UTC, Luis Bernardo
Details
patch to address original issue described (17.59 KB, patch)
2012-05-04 15:28 UTC, Luis Bernardo
Details | Diff
new output with 5 pages. (6.91 KB, application/pdf)
2012-05-04 15:29 UTC, Luis Bernardo
Details
testcase (764 bytes, text/x-xslfo)
2012-08-08 19:24 UTC, Matthias Reischenbacher
Details
PDF output before rev 1334058 (5.60 KB, application/pdf)
2012-08-08 19:27 UTC, Matthias Reischenbacher
Details
PDF output after rev 1334058 (5.13 KB, application/pdf)
2012-08-08 19:27 UTC, Matthias Reischenbacher
Details
fix for the break-before in a table (982 bytes, patch)
2012-08-08 23:58 UTC, Luis Bernardo
Details | Diff
layout engine test (2.47 KB, patch)
2012-08-09 22:14 UTC, Luis Bernardo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas L. Delmelle 2008-08-30 06:43:10 UTC
Created attachment 22502 [details]
testcase demonstrating the issue

see attachment: should produce 5 pages, but results in only 3
Comment 1 Glenn Adams 2012-04-07 01:44:29 UTC
resetting P2 open bugs to P3 pending further review
Comment 2 Luis Bernardo 2012-04-28 22:24:29 UTC
Created attachment 28690 [details]
related issue if inline replaced by block

I think that if the inline is replaced by a block we should still get 5 pages but we get 6.
Comment 3 Luis Bernardo 2012-04-28 22:25:25 UTC
Created attachment 28691 [details]
output of original testcase.fo
Comment 4 Luis Bernardo 2012-04-28 22:26:02 UTC
Created attachment 28692 [details]
output of newtestcase.fo
Comment 5 Luis Bernardo 2012-05-04 15:28:19 UTC
Created attachment 28735 [details]
patch to address original issue described

This patch fixes the original issue reported. The fix is not perfect and will probably need to be revisited in the future but it does its job without apparent side effects. With this fix break-before="page" in blocks inside inline elements (including nested inlines) are respected.

This patch does not address the related issue exemplified by the newtescase.fo where the inline was replaced by a block. I will create a new ticket to log that issue.
Comment 6 Luis Bernardo 2012-05-04 15:29:44 UTC
Created attachment 28736 [details]
new output with 5 pages.
Comment 7 Glenn Adams 2012-05-04 16:54:54 UTC
patch applied at http://svn.apache.org/viewvc?rev=1334058&view=rev

thanks andreas and luis!
Comment 8 Glenn Adams 2012-05-04 16:56:05 UTC
please verify and close if satisfied with fix
Comment 9 Matthias Reischenbacher 2012-08-08 19:23:37 UTC
This patch breaks support of break-before property on fo:table elements. See also newly attached test case.
Comment 10 Matthias Reischenbacher 2012-08-08 19:24:44 UTC
Created attachment 29188 [details]
testcase
Comment 11 Matthias Reischenbacher 2012-08-08 19:27:26 UTC
Created attachment 29189 [details]
PDF output before rev 1334058
Comment 12 Matthias Reischenbacher 2012-08-08 19:27:57 UTC
Created attachment 29190 [details]
PDF output after rev 1334058
Comment 13 Luis Bernardo 2012-08-08 23:58:12 UTC
Created attachment 29191 [details]
fix for the break-before in a table

elements with a break-before need to have the associated LayoutManager implement and have the type of BreakOpportunity; TableLayoutManager was not in that situation and hence the problem. there may be other cases but the fix is simple. I will provide a layout test later.
Comment 14 Luis Bernardo 2012-08-09 21:00:23 UTC
it is surprising that the issue with the break-before in the table was not caught by this layout engine render-test: table_table-row_break-before.xml
Comment 15 Luis Bernardo 2012-08-09 22:14:07 UTC
Created attachment 29205 [details]
layout engine test

layout engine test for attachment 29191 [details] (patch)
Comment 16 Vincent Hennebert 2012-09-04 16:14:45 UTC
Patch submitted in rev. 1380726:
http://svn.apache.org/viewvc?rev=1380726&view=rev

Thanks!
Vincent